Page 1 of 1

GetTextC Memory Leak?

Posted: Wed Mar 11, 2009 1:38 pm
by Stardust
Could it be that the GetTextC function caused a memory leak?

I am using Delphi 2009 with:

Code: Select all

ReportMemoryLeaksOnShutdown := True;
While using the GetTextC Function Delphi reports me a memory leak.


lg
Stardust

Posted: Thu Mar 26, 2009 6:22 pm
by Jean-Paul Brassard
Does this memory leak problem also present on Delphi 7?

Posted: Fri Mar 27, 2009 6:20 am
by isiticov
Method GetTextC() allocates a character buffer and returns pointer to it. So the calling code shall free it after usage.