I'm getting some sort of memory problem with the heap. I'm running a debug build of my software in the Visual Studio debugger and the following code sample
Code: Select all
wxString string="my string"; string.utf8_str();
Expression: __acrt_first_block == header
The error occurs when the wxScopedCharTypeBuffer<char> created by the call is deleted. From googling that error, it seems that a likely cause is that new is called in a dll and delete is called in a different dll or my exe. As all dlls and exes have different heaps the object is not there to delete.
I am kind of new to using dlls instead of static libs, if anybody can suggest where I could be going wrong that would be a huge help. Something that is kinda confusing to me is that the new and delete calls appear to be inlined in headers that get #included in my main application so I thought that they would actually be both created and destroyed on the heap of my exe.
I'm running with VS2017 and wxWidgets 3.0.4. This is a debug build and I'm linking against the Unicode debug (ud suffix) import libraries.