diff --git a/distrib/msw/tmake/bcc.t b/distrib/msw/tmake/bcc.t index 87cd636126..f72497fc81 100644 --- a/distrib/msw/tmake/bcc.t +++ b/distrib/msw/tmake/bcc.t @@ -144,7 +144,7 @@ wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) $(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(PERIPH_LIBS) erase $(LIBTARGET) - tlib $(LIBTARGET) /P1024 @&&! + tlib $(LIBTARGET) /P2048 @&&! +$(COMMONOBJS:.obj =.obj +)\ +$(GENERICOBJS:.obj =.obj +)\ +$(MSWOBJS:.obj =.obj +)\ diff --git a/docs/html/faqmsw.htm b/docs/html/faqmsw.htm index 085980f7b7..e5a7e96019 100644 --- a/docs/html/faqmsw.htm +++ b/docs/html/faqmsw.htm @@ -240,6 +240,34 @@ generated. At least it will divide the number of files in samples directory by 10 (and the number of files to be maintained too). +
+ +
+On the VC++ level, it's just the matter of calling _CrtSetDbgFlag() in the very +beginning of the program. In wxWindows, this is done automatically when +compiling with VC++ in debug mode unless wxUSE_GLOBAL_MEMORY_OPERATORS or +__NO_VC_CRTDBG__ are defined - this check is done in wx/msw/msvcrt.h which +is included from app.cpp which then calls wxCrtSetDbgFlag() without any +#ifdefs. + +This works quite well: at the end of the program, all leaked blocks with their +malloc count are shown. This number (malloc count) can be used to determine +where exactly the object was allocated: for this it's enough to set the variable +_crtBreakAlloc (look in VC98\crt\srs\dbgheap.c line 326) to this number and +a breakpoint will be triggered when the block with this number is allocated. + +For simple situations it works like a charm. For something more complicated +like reading uninitialized memory a specialized tool is probably better... + +Regards, +VZ ++ +