🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.webservices.soap
Article #12

Re: Leak in HTTPRio? in TOMCAT? No more Internet handles can be allocated

#12
From: Jean-Marie Babet
Date: Thu, 11 Oct 2007 23:20
28 lines
1947 bytes
Hello Mattia,

> if I delete the iRio, I receive an AccessViolation error.

The most common reason why deleting a RIO causes an AV is if it was created
with (NULL). When you create a RIO object with NULL, its lifetime will be
managed via the refcount of the interface it hands out. So you do *NOT* want
to call delete on the object explicitly. You simply want to release the
interface it handed out.

To illustrate:

  THTTPRIO* iRIO = new THTTPRIO(NULL);

  __di_someInterface service;
  iRIO->QueryInterface(service);

  service.Release();   // < (**)


The call to 'service.Release()' will cleanup the iRIO instance (provided  no
one else is holding on to references to 'service').

Let me know if the above does not help!

Cheers,

Bruneau.
Technical Details
Message-ID: <470eafa8$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!feeder3.cambrium.nl!feeder6.cambrium.nl!feed.tweaknews.nl!feeder.news-service.com!feeder.news-service.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <c1fcg3tprri33t0o5fhc95k11c9j91mv4h@4ax.com> <47066cc1$1@newsgroups.borland.com> <80sjg399o3gcaoplp4b16659c10s8fs32n@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11096a,bb6006ec953edc17
X-Google-Thread: 114096,bb6006ec953edc17
X-Google-Attributes: gid11096a,gid114096,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jean-Marie Babet" <bbabet@borland.com>
Newsgroups: borland.public.cppbuilder.webservices.soap,borland.public.delphi.webservices.soap
References: <c1fcg3tprri33t0o5fhc95k11c9j91mv4h@4ax.com> <47066cc1$1@newsgroups.borland.com> <80sjg399o3gcaoplp4b16659c10s8fs32n@4ax.com>
Subject: Re: Leak in HTTPRio? in TOMCAT? No more Internet handles can be allocated
Date: Thu, 11 Oct 2007 16:20:10 -0700
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 10.143.102.22
Message-ID: <470eafa8$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1192144808 10.143.102.22 (11 Oct 2007 16:20:08 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!feeder3.cambrium.nl!feeder6.cambrium.nl!feed.tweaknews.nl!feeder.news-service.com!feeder.news-service.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail