Sorry of the following message double posts, as I sent it the first time
from the wrong email account:
I am following up on a post in XMLVM-Users regarding improper releasing
of CGBitmapInfoRef and other CFType objects. Arno noted that the call
to CFRelase in CFType.finalize() was commented out (and he wasn't sure
why), presumably leading to such objects never being freed.
I tracked this down, and it seems to go back to a change to UIGraphics
in Rev 2118 by ppoley, about 9 months back. In that rev, he/she added
an explicit call to CGContextRelease in UIGraphics.popContext(), and
then REMOVED the corresponding call to CFRelease in CFType.finalize().
While I imagine that works well for that specific case, it seems to
cause a more general problem in that (best I can tell) derived CFType
objects, including CGBitmapInoRefs, etc., are never freed.
The obvious solution would be to simply uncomment the call to CFRelease
in CFType.finalize(), but I fear that this may cause the CGContextRef in
UIGraphics.popContext() to be double-released (probably raising an
exception?). Since I don't have a good understanding of why ppoley made
this change in the first place, I am a bit apprehensive about making any
changes.
On a related note, how does one obtain write access to SVN? I am still
in the beginning stages of figuring out XMLVM, so I don't anticipate
making any major changes. But it would be nice to be able to commit
simple changes -- e.g. implementing a new function or two -- into the
trunk.
JR
--
J.R. Schmidt
WebMO, LLC
|