Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/RTL/C++/Memory Management    [ Add a report in this area ]  
Report #:  22963   Status: Open
FastMM Memory leak tracking is not available for BCB applications.
Project:  C++Builder Build #:  10.0.2166.28377
Version:    10.0 Submitted By:   Roddy Pratt
Report Type:  Basic functionality failure Date Reported:  12/31/2005 11:20:16 AM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All versions Internal Tracking #:   238153
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (4 Total Ratings)
4.25 out of 5
Total Votes: 135
Description
As Pierre Le Riche describes in his document for using FastMM with BCB, a patch is required to  _exit to correctly close down the memory manager. Without this, FastMM can't check memory leaks in BCB applications, which is a real shame.

This hasn't been done in BDS2006.
Steps to Reproduce:
1: Create a new C++ Builder VCL Forms Project

2: Add the following lines of code to the beginning of WinMain function.



ReportMemoryLeaksOnShutdown = true;


malloc(1000);

3: Build and run the application.

4: Close your application

4:What SHOULD happen...
  FastMM displays a dialog indicating a memory leak (This does happen in Delphi W32 projects)

5: what DOES happen
  No dialog is displayed.
Workarounds
None
Attachment
JED34.zip
Comments

David Dean at 1/2/2006 2:21:14 PM -
Could you provide a URL to the documentation by Piere that you describe. Also some steps to duplicate are required to get a bug report opened.

Luis Branca at 4/8/2009 9:32:46 AM -
Would it be possible for an update of when could this be solved, or if it won't be fixed, is there any technical or other reason? It's been over 3 years and the original poster even provided a patch. Maybe this has just been labeled as not important to fix, but still... it's quite a nice functionality to have (work's on Delphi, just not on C++).

Luis Branca at 8/31/2010 5:02:20 AM -
It's now almost 5 years later, XE has just been released and it *still* has this bug on it. Any hope for the next Patch?

Tomohiro Takahashi at 8/31/2010 7:22:09 PM -
Unfortunately, this issue is still open. In fact, I also reported this issue 2 years ago...
I think that this limitation must be described in release note and Online document etc...

Luis Branca at 4/20/2012 2:26:35 AM -
CB XE2 UP4 - Still doesn't work (almost 7 years later)...

Roddy Pratt at 1/2/2006 2:56:31 PM -
I've added Pierres FastMM BCB support file (reqiured for BCB5/6) as an attachment. This contains the documentation.

I've also added steps to reproduce.

Stuart Kelly at 9/16/2006 3:36:39 PM -
Would this option interfere with CodeGuard when enabled?

Michael Vanderheyden at 7/6/2013 1:21:10 AM -
Hey,

dont know why, but the ReportMemoryLeaksOnShutdown variable dont works. But if you copy the Borlndmm.dll in your programs folder this dialog popups on closing your program. You have to set in linker settings "Use dynamic RTL" to true.
But what the hell, if you make an new application with only a form in it, open and close - fastmm report 10 leaks.
Tested with c++ builder 2010 SP4.
The variable ReportMemoryLeaksOnShutdown must not be set here.

Michael

Server Response from: ETNACODE01