@Castaa wrote:
#define _CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> #include "ofMain.h" class Test : public ofBaseApp { void setup() { ofGetMainLoop()->setEscapeQuitsLoop(true); } }; int main(int argc, char* args[]) { ofGLFWWindowSettings settings; auto window = ofCreateWindow(settings); Test* test = new Test(); ofRunApp(test); // test object has been freed at this point, VS throws an exception if I try to delete test _CrtDumpMemoryLeaks(); return 0; }I’m not 100% sure this is a bug but I’m not sure where else to post this. I apologize in advanced if this is my mistake on my end.
I’m using VS’s leak detection system and testing in Debug Mode in Visual Studio 2017 using OF 0.9.8.
https://msdn.microsoft.com/en-us/library/x98tx3cf.aspxI don’t mind if OF has unfreed memory upon app exit as long as long as it’s of fixed size (and not a growing leak).
My issue is that the massive dump of leak message make it difficult for me to find reported memory leaks in my own code on exit which is obviously important to me.
I am doing something incorrectly?
Posts: 3
Participants: 2