Thanks for your reply.

So even I keep calling this function?

void some_function()
{
   display_ =
      Gdk::Pixbuf::create
        (view_, get_default_colormap(), 0,0,0,0, 500, 500);
}

say display_ is a member variable of a class that stays in scope for the 
duration of my application,
Glib::RefPtr<Gdk::Pixbuf> display_;

No memory leak?


>From: Paul Pogonyshev <[EMAIL PROTECTED]>
>To: [email protected]
>CC: "Rose Cumming" <[EMAIL PROTECTED]>
>Subject: Re: Memory leak of RefPtr?
>Date: Fri, 25 Aug 2006 00:37:05 +0300
>
>Rose Cumming wrote:
> > The question is, will this
> > viewBuffer_ = (*buffer)->scale_simple(100,100,Gdk::INTERP_BILINEAR);
> > cause memory leak?
>
>No.
>
> > Or there're "better" (proper) way to unref the smart pointer or 
>something?
>
>Not really.  You can use constuctor initialization, though.
>
>Paul

_________________________________________________________________
Play Q6 for your chance to WIN great prizes.  
http://q6trivia.imagine-live.com/enca/landing

_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to