Article View: borland.public.cppbuilder.nativeapi
Article #17339Re: Ternary operator memory leak
From: Michael Kelly
Date: Thu, 03 Apr 2003 22:52
Date: Thu, 03 Apr 2003 22:52
24 lines
1757 bytes
1757 bytes
On Thu, 3 Apr 2003 03:40:31 -0500, "Mark Guerrieri" <mguerrieri@cmsgrp.com>
wrote:
>When the service runs, watching its process in the Task Manager (I know, its
>only an approx.) show the memory usage of the process continually increasing
>forever.
How about setting the condition so that it is always false
and see if you still have a leak? Seems like if the term
that should be evaluated if the condition is true, got
evaluated every time through the loop, then you would
have an allocation that's discarded(leak.) I dunno' why
this would happen though.
See the Bug++ column of Windows Developer Magazine
for March 2003 for some stuff about the ?: operator evaluating
the right hand side if there's a type mismatch. Seems bizarre
but who knows?
--
"I don't want to belong to any club that would have me as a member."
-- Groucho Marx
Technical Details
Message-ID:
<qkep8vg83uauivbohirnld8akmmttav577@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e8bf300$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-03 14:56:15 PST From: Michael Kelly <mkelly00@netzero.net> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Ternary operator memory leak Date: Thu, 03 Apr 2003 17:52:33 -0500 Message-ID: <qkep8vg83uauivbohirnld8akmmttav577@4ax.com> References: <3e8bf300$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 1049410468 24.51.217.134 (3 Apr 2003 14:54:28 -0800) Lines: 24 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail