🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Registering Help Viewer

#8617
From: Remy Lebeau (TeamB)
Date: Fri, 08 Oct 2004 20:46
27 lines
2221 bytes
"3 Wishes" <3@wishes.com> wrote in message
news:4166f436$1@newsgroups.borland.com...

> Yes, I do not like it either, but the problem persist with the
> Release function, making it an issue to compile the code itself.

Then there is a bug in the compiler.  That is the only explanation.

> Where I am saved somewhere, is that all those interface are
> nevertheless structures apparently, without any constructor at all,
> so rouglhly it just seems to be a block of memory of the proper size.

Not true.  Everything that begins with "_di_" is a typedef for the
DelphiInterface wrapper, which is most certainly a full class, complete with
constructor and destructor and all of that.

> The bad thing, is that by allowing that block, I do not
> increment the reference counter either

The counter is incremented automatically when the interface is returned by
RegisterViewer().  You do not need to increment it yourself at all.  If you
do, then it will not be decremented properly, and the memory for the
interface will leak since the counter never falls to 0.


Gambit
Technical Details
Message-ID: <4166fe94$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4165b82e$2@newsgroups.borland.com> <4165c3bb$1@newsgroups.borland.com> <4165d4c5@newsgroups.borland.com> <4165d89f$1@newsgroups.borland.com> <4165da2a$1@newsgroups.borland.com> <4166370b@newsgroups.borland.com> <4166cdff@newsgroups.borland.com> <4166f436$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,fa848f661129ced4
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4165b82e$2@newsgroups.borland.com> <4165c3bb$1@newsgroups.borland.com> <4165d4c5@newsgroups.borland.com> <4165d89f$1@newsgroups.borland.com> <4165da2a$1@newsgroups.borland.com> <4166370b@newsgroups.borland.com> <4166cdff@newsgroups.borland.com> <4166f436$1@newsgroups.borland.com>
Subject: Re: Registering Help Viewer
Date: Fri, 8 Oct 2004 13:46:08 -0700
Lines: 29
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: <4166fe94$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1097268884 68.69.17.41 (8 Oct 2004 13:54:44 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail