RTC Forums
November 24, 2024, 06:24:24 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Memory leak EDelayedCall when compile in 64 bits  (Read 4315 times)
Cesar
RTC Expired
*
Posts: 17


« on: November 04, 2014, 02:09:32 AM »

Hi, I'm using Delayed Calls in Delphi XE3 but when I compile in 64 bits I have a memory leak from the object EDelayedCall at the PostDelayedCall function. The memory leak doesn't appear when I compile in 32 bits.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: November 04, 2014, 03:10:11 AM »

Except for using 32bit or 64bit integers for storing pointers, there is no difference in RTC code between 32bit and 64bit versions. If there is a memory leak which is caused by a bug in RTC code, it will happen in 32bit and 64bit versions. If you do not see the memory leak in a 32bit version, the leak could also be caused by the Debugger or a bug in the 64bit Memory Manager. Using FastMM with Debugging enabled and running your Project without the Debugger and outside of Delphi might help you find where and when the memory leak happens and what's causing it.

PostDelayedCall function creates a new EDelayedCall instance, puts your TRtcDelayedCall instance (passed in as a parameter) inside it and raises the EDelayedCall exception. That's all the function does. If the function is called from inside the OnExecute event of a TRtcFunction object, then the exception will be caught by the RTC code, the TRtcDelayedCall object removed from the EDelayedCall instance and the EDelayedCall instance will be released by the code injected by the Delphi compiler.

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.024 seconds with 16 queries.