pleriche / FastMM4

A memory manager for Delphi and C++ Builder with powerful debugging facilities
446 stars 158 forks source link

FastMM has detected a FreeMem call after FastMM was uninstalled #41

Open MarcAntheunis opened 7 years ago

MarcAntheunis commented 7 years ago

hi, i get this error only on windows 7 vm in win 10 all goes well build with latest fastmm and 10.2 Tokyo any idea how to get rid of this (besides turning NeverUninstall on)?

tia, Marc

MarcAntheunis commented 7 years ago

it has to do with the following code in system.pas finalization section:

FinalizeLocaleDate; if PreferredLanguagesOverride <> nil then FreeMem(PreferredLanguagesOverride);

the freemem is the one to blame apparently...

(10.2 tokyo)

pleriche commented 7 years ago

This is a known issue: https://quality.embarcadero.com/browse/RSP-16796

EMBBlaster commented 7 years ago

So it is the same problem in #18

MarcAntheunis commented 7 years ago

ok

graemeg commented 5 years ago

Is there any solution to this yet? I'm using Delphi Tokyo 10.2.2 as well.

[edit] Looking at the System.pas unit, I thought that adding the following code at the end of my application's program unit will work around the problem, but it doesn't. The error is still happening. So is the code that MarcAntheunis mentioned actually the problem?

program xyz;
begin
   .....snip...

SetLocaleOverride('');
end.
MarcAntheunis commented 5 years ago

i've upgraded components in Tokyo and the problem is back again… setlocaloverride('') does not work anylonger

MarcAntheunis commented 5 years ago

for some reason InstHashMap is used apparently...

MarcAntheunis commented 5 years ago

in my case the Remobjects Dataabstract latest release is the one that introduces a weak reference…