Article View: borland.public.cppbuilder.nativeapi
Article #2618Re: Memory Leak - TForm or TStringGrid or DynamicArray
From: Dan Mayo
Date: Tue, 06 Feb 2007 15:28
Date: Tue, 06 Feb 2007 15:28
23 lines
1765 bytes
1765 bytes
Remy Lebeau (TeamB) wrote:
> That is what CodeGuard is for instead.
I guess I will turn on CodeGuard and see what's going on; I've never
used it before.
Ok, so I run it, and I get an error immediately on startup that seems odd:
Method called on illegally casted object
Attempt to access 4 byte(s) at 0x006AC05C. The 'this' pointer
points to a block 0x006AC05C(....) which is only 1 bytes long
SETTINGS_FILE_NAME
And then points me to a problem in dstring.h
The SETTINGS_FILE_NAME is a constant string defined prior to my class
definition as:
String SETTINGS_FILE_NAME =
ExtractFileDir(Application->ExeName)+"\\settings.ini";
What's wrong with that?
Dan
Technical Details
Message-ID:
<45c89ec6@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<45c7810f@newsgroups.borland.com> <45c7dc8d$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,191a7d21d69bde32 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 06 Feb 2007 09:28:04 -0600 From: Dan Mayo <do_not_spam_dmayo2@netzero.com> User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Memory Leak - TForm or TStringGrid or DynamicArray References: <45c7810f@newsgroups.borland.com> <45c7dc8d$1@newsgroups.borland.com> In-Reply-To: <45c7dc8d$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 216.174.165.174 Message-ID: <45c89ec6@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1170775750 216.174.165.174 (6 Feb 2007 07:29:10 -0800) Lines: 23 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail