Skip site navigation (1) Skip section navigation (2)

Re: possible memory leak in Server Status window

From: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Guillaume Lelarge <guillaume(at)lelarge(dot)info>, Julius Tuskenis <julius(at)nsoft(dot)lt>, pgadmin-support(at)postgresql(dot)org
Subject: Re: possible memory leak in Server Status window
Date: 2011-02-12 14:59:05
Message-ID: AANLkTikQ8s_9kmRM+MRonpMaZrJ+7gxEyH_j60kdHWbQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-support
On 12 February 2011 14:22, Dave Page <dpage(at)pgadmin(dot)org> wrote:
> Note the lack of a delete - that's the point here; it's not needed
> because as soon as the smart pointer goes out of scope, it's
> destructor will delete foo. That means you don't have to remember to
> include the delete in each of the many exit points of the code.
>
> See also http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization

"Resource Acquisition is Initialization" is a terrible name. Some
people call it "scope bound resource management", which makes a lot
more sense, but isn't as widely known.


-- 
Regards,
Peter Geoghegan

In response to

Responses

pgadmin-support by date

Next:From: Dave PageDate: 2011-02-12 15:00:53
Subject: Re: possible memory leak in Server Status window
Previous:From: Dave PageDate: 2011-02-12 14:30:47
Subject: Re: Enpty field, grid editor, NOT NULL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group