Closed
Bug 742100
Opened 12 years ago
Closed 3 years ago
gfxContext should support stack allocation, it shouldn't be refcounted
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: BenWa, Unassigned)
References
Details
Most use cases of gfxContext is a temporary stack objects to draw to an image. Because the object is refcounted it must be allocated on the stack because as soon as you pass it to somethings that tries to ref count it, it will Release() your object later and BOOM 'delete gfxContext' gets called. This mean gfxContext shouldn't be recounted. We've removed instances before in bug 383166 but as soon as you need to pass a gfxContext* to something (layout) then you can't guarantee that it wont try to AddRef/Release.
Comment 1•12 years ago
|
||
Considering we want to phase out gfxContext longer term and gfxContext creations should not be in performance critical loops or anything of the likes, I have my doubts whether this is worth it.
Comment 2•3 years ago
|
||
gfxContext can't be stack allocated any more due to the dtor being private. That was fixed in bug 1028134.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•