🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #9242

Re: Thread and memory

#9242
From: Remy Lebeau (TeamB)
Date: Tue, 20 Jul 2004 06:09
20 lines
1674 bytes
"Sara T." <sarana@infoquest.co.th> wrote in message
news:40fcab00@newsgroups.borland.com...

> I thought when I set FreeOnTerminate to true, thread should
> be cleared and free up memory but the pointer of object
> MyThread, need it to be cleared?

The thread object itself is freed, but the pointer that points to the object
does not been to be cleared unless you have other code that still uses that
pointer for other purposes.

> In fact the line number 1: has been called a lot of times and
> I thought that it should be OK if it is a thread with using
> FreeOnTerminate.

In the example you have shown, it is fine.


Gambit
Technical Details
Message-ID: <40fcb75c$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40fb3d08@newsgroups.borland.com> <40fbf87b$1@newsgroups.borland.com> <40fbfd74$1@newsgroups.borland.com> <40fc1022$1@newsgroups.borland.com> <40fcab00@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: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References:  <40fb3d08@newsgroups.borland.com> <40fbf87b$1@newsgroups.borland.com> <40fbfd74$1@newsgroups.borland.com> <40fc1022$1@newsgroups.borland.com> <40fcab00@newsgroups.borland.com>
Subject: Re: Thread and memory
Date: Mon, 19 Jul 2004 23:09:57 -0700
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <40fcb75c$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1090303836 68.69.17.41 (19 Jul 2004 23:10:36 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail