Re: GtkGC shared auto-release
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: GtkGC shared auto-release
- Date: Sat, 22 Dec 2007 18:20:13 +0100
On Sat, 2007-12-22 at 10:08 +1100, Kevin Ryde wrote:
How about calling the package Gtk2::Ex::GCPool or similar?
That could be ok.
That is, have Gtk2::Ex::GCPool->get bless the gc
into Gtk2::Ex::GCPool::CustomGC and put the @ISA mangling and DESTROY in
that package.
That'd make live easier for further subclassing would it?
Hmm, I'm not sure anymore. When I made the Gtk2::Ex::GCPool suggestion,
I was thinking that the thing that you call get() on and the thing that
is returned from get() are different conceptually. But if you think of
get() as a constructor, that's not true.
So my current thinking is that the most sensible name would be
Gtk2::Ex::SharedGC. Or maybe some name that conveys the automatic
releasing done. Gtk2::GC itself already offers shared GCs, so there
ought to be something better than SharedGC.
The code would otherwise be identical to what you originally posted.
--
Bye,
-Torsten
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]