On Fri, Jan 23, 2015 at 07:57:59AM -0500, Rene Gollent wrote: > On Fri, Jan 23, 2015 at 7:46 AM, <pulkomandy@xxxxxxxxxxxxx> wrote: > > color_space fColorSpace; > > BitmapHWInterface* fHWInterface; > > - UtilityBitmap* fBitmap; > > + BReference<UtilityBitmap> fBitmap; > > BRegion fClipping; > > }; > > > > > > > > I should further note, is fBitmap always assigned a reference to an > already existing UtilityBitmap? I see no adjustments in this commit to > the places where its value is assigned, so if it's ever the case that > said assignment is a freshly created one via operator=, you're > potentially leaking a reference here. The bitmap is owned by this class, it is not shared or exposed anywhere. Only newly created objects are assigned to it, but you are right, this leaks a reference. I'm changing this to use ReleaseReference instead as it is simpler and better. -- Adrien.