Здравствуйте. Вообщем я объявил войну утечкам. Я хотел-бы узнать какие есть способы функционально заюзать MemCheck. У меня получается утечка (таких много)
| Код | Stack trace of when this block was allocated (return addresses): 402A27 [System][@GetMem] 40365F [System][TObject.NewInstance] 403A26 [System][@ClassCreate] 42B342 [Graphics][TFont.Create] 7C809EFF [InitializeCriticalSection] 42BE55 [Graphics][TCanvas.Create] 42FD82 [Graphics][TBitmapCanvas.Create] 430FED [Graphics][TBitmap.GetCanvas] 4687A7 [ImgList][TCustomImageList.InitBitmap] 468723 [ImgList][TCustomImageList.Initialize]
The block is currently used for an object of class: TFont
The allocation number is: 7095
|
Код большого размера понять методом тыка неособо легко. А в вышепреведённом отрывке logа нету за что зацепится особо. Начал читать доки по MemCheck и вот нашол непонятный для меня момент http://v.mahon.free.fr/pro/freeware/memcheck/tutorial_findleaks.htm Там написано следущее
| Цитата | Get the call stack information in the debugger
Again, this was written before the debug info was available in the text file. So today this is less useful.
1. Run the example above 2. The debugger tells you there is a leak in the routine Leak 3. Press Ctr-F7 and evaluate the global boolean variable ShowCallStack (it is defined in MemCheck). Change it to True. 4. Press F9. The debugger shows you the calling line. You can go on seeing the stack...
|
Код у меня получился следущий к tutorial
| Код | program Project1;
uses FastMM4;
{$R *.res}
procedure Leak; begin TObject.Create; end;
procedure CallLeak; begin Leak; end;
var i: integer; begin for i:= 1 to 5 do CallLeak; end.
|
Я непонимаю что они всетаки имели ввиду
| Цитата | 3. Press Ctr-F7 and evaluate the global boolean variable ShowCallStack (it is defined in MemCheck). Change it to True.
|
Это до сообщения leak или после както нужно сделать? Может этот момент мне както поможет? |