🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Ternary operator memory leak

#17359
From: Michael Kelly
Date: Sat, 05 Apr 2003 00:15
23 lines
1859 bytes
On Fri, 4 Apr 2003 00:24:44 -0500, "Mark Guerrieri" <mguerrieri@cmsgrp.com>
wrote:

>So it seems that whenever the evaluated expression does a Trim(), memory is
>leaked.  Why would this be? 

I don't have BCB so I can't look at the source to see what
Trim does that may leak, but what I don't get is why it 
would only happen with ?: operator?  Other than the fact 
that a temporary is created.  My thought was that maybe
the expression that wasn't supposed to get evaluated
was being run anyway, creating a temporary and thereby
a dangling pointer or reference.

Maybe someone with BCB can narrow it down.
If you ever find out what's up I hope you post
what you learn.

-- 

"I don't want to belong to any club that would have me as a member."

    -- Groucho Marx
Technical Details
Message-ID: <oq7s8vknteieb3rhtt4hl642bk1146rfj2@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!ken-transit.news.telstra.net!news.telstra.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3e8bf300$1@newsgroups.borland.com> <qkep8vg83uauivbohirnld8akmmttav577@4ax.com> <3e8d169d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,e689c7bb2171dc9a
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-04-04 16:17:35 PST
From: Michael Kelly <mkelly00@netzero.net>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Ternary operator memory leak
Date: Fri, 04 Apr 2003 19:15:04 -0500
Message-ID: <oq7s8vknteieb3rhtt4hl642bk1146rfj2@4ax.com>
References: <3e8bf300$1@newsgroups.borland.com> <qkep8vg83uauivbohirnld8akmmttav577@4ax.com> <3e8d169d$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.92/32.572
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 24.51.217.134
X-Trace: newsgroups.borland.com 1049501704 24.51.217.134 (4 Apr 2003 16:15:04 -0800)
Lines: 23
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!ken-transit.news.telstra.net!news.telstra.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail