ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 memory leak in ieExFolderMView
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Anha

Germany
1 Posts

Posted - Jul 11 2014 :  00:27:39  Show Profile  Reply
The FastMM4 Memory Manager reports:

This application has leaked memory. The small block leaks are (excluding expected leaks registered by pointer):
37 - 52 bytes: TIEFileDragDrop x 1


That is located in ieExFolderMView.pas.
It is created in TImageEnFolderMView.Create:
fDragDrop := TIEFileDragDrop.Create(Self, DropFiles);

But TImageEnFolderMView.Destroy shows:
fDragDrop := nil; // don't free


The "don't free" tells me it is on purpose, but can someone explain me why there is a needed Memory leak?

Andreas

xequte

38616 Posts

Posted - Jul 11 2014 :  08:30:11  Show Profile  Reply
Hi

Specifically speaking, it is not a memory leak as the application will free the memory on shut down anyway. It is called like this to delay the freeing until as late as possible.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

stuartclennett@gmail.com

United Kingdom
72 Posts

Posted - Mar 07 2019 :  09:41:55  Show Profile  Reply
Hi,
<Thought I'd ressurect this post, rather than creating a new one>

I'm getting the same "leak" reporting in v8.3.

The issue I have with "free the memory on shutdown anyway" ... is that the FolderMView is in a sub-form that can be created/destroyed many times during the application up-time. Users are usually sat at this for 6-8 hours/day, some leave the app open for days on-end & just lock their PC when going home.

This is what I get in just a couple of minutes:

This application has leaked memory. The small block leaks are (excluding expected leaks registered by pointer):

37 - 52 bytes: TIEFileDragDrop x 5

Cheers



Stuart Clennett
Delphi Berlin 10.1
Go to Top of Page

xequte

38616 Posts

Posted - Mar 07 2019 :  15:05:50  Show Profile  Reply
Hi Stuart

Well, you would need to free the TIEFolderMView thousands of times for there even to be a negligible effect. Whereas destroying the drag-drop interface if still active...

But you are right. We should handle this better, so we'll investigate for for 8.3.1.


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

stuartclennett@gmail.com

United Kingdom
72 Posts

Posted - Mar 07 2019 :  15:12:53  Show Profile  Reply
Hi Nigel,

Yes, I guess you're right about the amount of memory leak. Probably overreacting :)

Cheers

Stuart Clennett
Delphi Berlin 10.1
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: