reference counts on pixmaps.....
- From: raster redhat com
- To: gtk-list redhat com
- Subject: reference counts on pixmaps.....
- Date: Tue, 13 Jan 1998 13:30:33 -0500 (EST)
okay.. i didnt write gdk.. but...
it seems the reference countin on pixmaps doesnt work as i'd expect it
to.. ie..if i gdk_window_set_back_pixmap, i would expectt he count to
go up, and then i seta new background, the previous backgorund pixmap
count goes down, the new one goes up, and if the count is zeor on the
pixmap, and a free is called its deleted, but calling
gdk_pixmap_destroy shoud destroy it if the ref count is <= 0. doethe
destory function does this.. but pixmaps are created with a ref count
of 1, so destorying sets the count to 0, but does not free it.. so i'd
need to call 2 destroy's.... shouldnt the ref count start at 0? and
setting background pixmaps should also add/del to ref counts.. and if
deleting should aslo call a funtion to check for a <= 0 count, and if
the "deleted" flag (destroyed) is set (the destroy function should set a
flag like this) and the count is <= 0 then it is actually freed.
any comments form those more initmate wiht gdk?
--
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
raster@rasterman.com /\___ /\ ___/||\___ ____/|/\___ raster@redhat.com
Carsten Haitzler | _ //__\\ __||_ __\\ ___|| _ / Red Hat Advanced
218/21 Conner Drive || // __ \\_ \ | | \ _/_|| / Development Labs
Chapel Hill NC 27514 USA ||\\\/ \//__/ |_| /___/||\\ 919 547 0012 ext 282
+1 (919) 929 9443, 801 4392 For pure Enlightenmenthttp://www.rasterman.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]