Re: [gnomemm] Gnome::Canvas, Emergency !!
- From: Ole Laursen <olau hardworking dk>
- To: gnomemm-list gnome org
- Subject: Re: [gnomemm] Gnome::Canvas, Emergency !!
- Date: 04 Dec 2002 21:41:15 +0100
"gao chaowei" <chaoweigao hotmail com> writes:
> I drew something in a Gnome::Canvas. And I want to CLEAR the items
> canvas and want drawing somthing else. And I want DELETE the items in
> the canvas to save memary space. What should i do to achieve the
> goals? Wait for your response~
Like this:
// create
Gnome::Canvas::Pixbuf my_item = new ...;
// now use the item ...
// delete and clear
delete my_item;
It is pretty simple. When you create the item with 'new' and don't tell
G*mm to treat it specially, you simple 'delete' it later to remove it
from memory, just as any other object. The canvas will automatically
redraw itself, clearing up.
--
Ole Laursen
http://www.cs.auc.dk/~olau/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]