Article View: borland.public.cppbuilder.internet.web
Article #288Re: TCPPWebBrowser causing an AV
From: Eduardo Jauch
Date: Tue, 20 Feb 2007 22:18
Date: Tue, 20 Feb 2007 22:18
45 lines
2268 bytes
2268 bytes
In yor code, you used this form to acess the TCppWebBrowser: this->CppWebBrowser1->... Your code don't show, but the pointer "this" is unecessary, unless you have another variable named "CppWebBrowser1" :) Tom escreveu: >> You are not freeing the TStreamAdapter anywhere. > I tried simply deleting it and that didn't work. So I used > Adapter->_Release(); > Adapter = NULL; > > Is that correct? > Where is "Adapter" in your code? > With that in place it still causes an access violation > when the application is closed. > TStreamAdapter *IStr=new TStreamAdapter(mstm,soReference); This MUST be freed with "delete", because you used the operator "new". I think that are objects that can free itself, etc, but this don't seens the case... So, use: delete IStr; For the access violation, if it continues after you delete IStr, so the problem problably are on another portion of your program... ;) Sometimes this can happen when you try to delete an object previously deleted... Or you are trying to access an empty object... Take a look on the rest of your code... :) If this is the ONLY piece of code... Well... I can't figure what is wrong but the ausence of delete IStr...
Technical Details
Message-ID:
<45db7380$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45d852e5$1@newsgroups.borland.com> <45db43cc@newsgroups.borland.com> <45db63e3$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,2dcae0388f1713b X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 20 Feb 2007 20:18:13 -0200 From: Eduardo Jauch <eduardo.jauch@gmail.com> User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.web Subject: Re: TCPPWebBrowser causing an AV References: <45d852e5$1@newsgroups.borland.com> <45db43cc@newsgroups.borland.com> <45db63e3$1@newsgroups.borland.com> In-Reply-To: <45db63e3$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 201.89.78.51 Message-ID: <45db7380$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1172009856 201.89.78.51 (20 Feb 2007 14:17:36 -0800) Lines: 45 Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail