Board index » kylix » tthread's not getting freed

tthread's not getting freed


2003-07-03 01:45:43 AM
kylix0
I'm going to post this in a few spots in hopes that someone else here has
encountered this problem and found a solution.
Basically I have an app that needs to use threads. It's a single codebase
meant to compile and run on both Win and RH. I've discovered that the
TThread.Free method does absolutely squat. The thread resources don't get
freed when this call is made and thusly just become one big memory leak. Now
this doesn't seem to be a huge problem when running on WinXP, etc... however
on RH after doing numerous tasks where theoretically threads should be
getting created and destroyed manymany times, RH runs out of resources to
create new threads and crashes.
This code is in a unit with no form associated with it, if this info will
help.
Hopefully someone else here has at least run into this trouble and if I'm
luck has a suggested solution. Thanks!
 
 

Re:tthread's not getting freed

Wendy Carson wrote:
Quote
Basically I have an app that needs to use threads. It's a single
codebase meant to compile and run on both Win and RH. I've discovered
that the TThread.Free method does absolutely squat. The thread
resources don't get freed when this call is made and thusly just
become one big memory leak.
Have you tried to start the app from command line or without integrated
debugging? It seems that the De{*word*81} keeps the threads alive.
--
Regards
Andreas Hausladen
(www.kylix-patch.de.vu unofficial VisualCLX patches)
 

Re:tthread's not getting freed

Andreas,
Thanks. I'd discovered this on my own. A nice little bug that's built into
Kylix unfortunately... although Borland doesn't document it. I found a nice
little reference on it in Jon Shemitz's book. When running an app within
Kylix threads don't properly free...
Hopefully keeping this message thread here on the newsgroup will keep others
from encountering this same frustration.
Wendy
"Andreas Hausladen" < XXXX@XXXXX.COM >wrote in message
Quote
Wendy Carson wrote:

>Basically I have an app that needs to use threads. It's a single
>codebase meant to compile and run on both Win and RH. I've discovered
>that the TThread.Free method does absolutely squat. The thread
>resources don't get freed when this call is made and thusly just
>become one big memory leak.

Have you tried to start the app from command line or without integrated
debugging? It seems that the De{*word*81} keeps the threads alive.


--
Regards

Andreas Hausladen
(www.kylix-patch.de.vu unofficial VisualCLX patches)
 

{smallsort}