Re: [gtkmm] Pixbuf memory management



On Mon, 2002-10-28 at 21:40, Daniel Elstner wrote:
> Erm, I don't see the problem here.  The 2nd overload of
> Gdk::Pixbuf::create_from_data() takes a SigC::Slot to a custom destroy
> function, so you can simply do:
> 
> void destroy_image_data(const guint8* data)
> {
>   delete[] data;
> }
> 
> and pass this function for the destroy_slot argument.

But this doesn't take a copy of the data. But it would allow Jussi to
make his own copy and use this to ensure that the copy was deleted
later. I'd still like to see this improved in a future gtkmm.

-- 
Murray Cumming
murray usa net
www.murrayc.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]