This patch fixes the problem, but it adds an ugly public constructor. Any ideas for how to avoid that?
Created attachment 7269 [details] [review] cairomm_refptr_cast_refcount.patch 2006-10-05 Murray Cumming <murrayc@murrayc.com> * cairomm/refptr.h: Added RefPtr(object, refcount) constructor for use in cast_*(), so that the casted RefPtr shares the same refcount, avoiding an early deletion. I do not like making this constructor public, but I do not see another way.
Ugh. That *is* ugly, isn't it? I racked my brain for a while tonight trying to think of other ways to do it, but I haven't come up with anything yet. I'll keep thinking though.
committed. Will be in version 1.4.2
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.