Re: Memory leak of RefPtr?
- From: "Rose Cumming" <rose_alice_cumming hotmail com>
- To: pogonyshev gmx net, gtkmm-list gnome org
- Subject: Re: Memory leak of RefPtr?
- Date: Thu, 24 Aug 2006 21:35:45 +0000
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 <pogonyshev gmx net>
To: gtkmm-list gnome org
CC: "Rose Cumming" <rose_alice_cumming hotmail com>
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]