Search the Community
Showing results for tags 'fastmm'.
Found 2 results
-
Finding Memory Leak fast with Spring4D container?
egroups posted a topic in Algorithms, Data Structures and Class Design
Hi there, I convert legacy application to using Spring4D container for dependency injection. For memory leaks using FastMM4. Occasionally appear memory leak in different places and I solve them gradually. The problem is with the use of dependency injections, FatsMM generates very large log file (aka 2GB) and very long time.Some registered class in container not call Destroy (memory leaks in dependency graph). Is there any way to more easily and quickly detect places where there is a memory leak? Any extension for container or different method? -
I have just upgraded from Delphi 10.3 to 10.4. I have been using FastMM 4.992 in my projects. The main form has an initialization ReportMemoryLeaksOnShutdown := True; TfrmMain.SetMyStyle; SetMyStyle is defined class procedure TfrmMain.SetMyStyle; var sStyleFile: string; bOK: Boolean; sPath: string; begin sStyleFile := 'C:\DevFolder\21.0\bin\Win32\Debug\Styles\Calypso_Win.style'; if TFile.Exists(sStyleFile) then begin bOK := TStyleManager.SetStyleFromFile(sStyleFile); end; end; In 10.3 this works without any issues. In 10.4, FastMM4 generates an AV on closedown FastMM has detected an attempt to call a virtual method on a freed object. An access violation will now be raised in order to abort the current operation. Unfortunately the block header has been corrupted so no history is available. The current thread ID is 0x27F4 and the stack trace (return addresses) leading to this error is: 6DCB67 {FMX.Controls.pas][FMX.Conrols.TControl.Repaint][3547] 76A260 FMX.Styles.Objects.pas][FMX.Styles.Objects][Styles.OBjects.TButtonStyleObject.NormalTriggered][2357] .... I have GExperts install, and it generats a message Project xx.exe raised exception EAccessVioloation with message 'Access Violation at address 776B4662. Read of address 00000000'. This is in a new project, which has no components on the form. The only changes to the default new project are the uses in the dpr for FastMM, the class procedure, initialization and addition uses in the main form for FMX.Styles and System.IOUtils. The options I have changed in FastMM4Options.inc are {$define NeverUninstall} {$define UseRuntimePackages} {$define NoDebugInfo} {$define FullDebugMode} {$define CatchUseOfFreedInterfaces} {$define ClearLogFileOnStartup} {$define DisableLoggingOfMemoryDumps} {$define HideMemoryLeakHintMessage} The style I am using is Calypso_Win.style. This is one of the premium styles available through Getit. Does anyone have any idea of where I should be looking for the problem. Sue