Article View: borland.public.cppbuilder.nativeapi
Article #9372Re: Thread and memory
From: JD
Date: Mon, 19 Jul 2004 16:36
Date: Mon, 19 Jul 2004 16:36
23 lines
1572 bytes
1572 bytes
"Sara T." <sarana@infoquest.co.th> wrote: > I write a code of thread and often found the process eat mem > too much, I suspect the method to create threads in main program. Creating the thread isn't the problem. > If I call main program a lot of times, can it make some > memory leak? Because I cannot delete and don't know where to > delete object MyThread. If you don't delete the thread when it's finished and allocate a new one - that's you're problem. And yes, that is a memory leak - a very big one at that. > Please help. You need to provide a more complete sample and explaination of when/how the thread gets created, what it does, when it's finished and if you allow multiple instance of the same thread type to execute. ~ JD
Technical Details
Message-ID:
<40fbf87b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.agarik.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40fb3d08@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d35c53850c011fac X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "JD" <nospam@nospam.com> Sender: "JD" <nospam@nospam.com> Reply-To: "JD" <nospam@nospam.com> Subject: Re: Thread and memory Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 172.159.217.153 References: <40fb3d08@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <40fbf87b$1@newsgroups.borland.com> Date: 19 Jul 2004 09:36:11 -0700 X-Trace: newsgroups.borland.com 1090254971 207.105.83.66 (19 Jul 2004 09:36:11 -0700) Lines: 25 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.agarik.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail