How does CoFreeUnusedLibrariesEx affect TTimers in delphi?

We had to use CoFreeUnusedLibrariesEx to fix an error where the heap was not cleared after using the MSXML library Go to this link: http://blogs.msdn.com/b/marcelolr/archive/2008/11/13/msxml-heaps-not-being -released.aspx

But this caused another problem with TTimers which is required while it appears and disappears when the Delphi app bounces and shows again after a while.

This application uses TTimers to assign it a job, such as performing an XML transformation.

Here's the problem: When TTimer.Enable is called, it causes the error to be unavailable for the timer. I know this is a disguised error and I will need to figure out how to get to the actual error.

It is a single threaded application with one timer.

Here are the links I have looked through Most common cause is wrong window handle https://groups.google.com/forum/#!topic/borland.public.delphi.winapi/UrIskaFZggU

There are other threads that assumed the OS was running out of resources for TIMERS. I'm not sure if this applies to me.

I'm just trying to figure out what the interaction is between CoFreeUnusedLibrariesEx and TTimers, that gradually some of them rob it of resources and force us to abandon the application to make it work.

How do I solve this problem, I am looking for some directions?

+3


source to share


1 answer


CoFreeUnusedLibrariesEx should not affect TTimers. But if loading and unloading (buggy) dll leaks any user objects (including timers, window handles, ...), then I can imagine that you are out of user objects.



Use the Windows Task Manager and configure it to show USER Objects in the Processes tab. Then compare the number of custom objects when you call CoFreeUnusedLibrariesEx and when you don't call CoFreeUnusedLibrariesEx.

+1


source







All Articles