Summary: | RefPtr: refcounting broken with cast_*() methods. | ||
---|---|---|---|
Product: | cairomm | Reporter: | Murray Cumming <murrayc> |
Component: | General | Assignee: | Murray Cumming <murrayc> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | high | ||
Version: | unspecified | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | cairomm_refptr_cast_refcount.patch |
Description
Murray Cumming
2006-10-05 06:29:11 UTC
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.