Call ReleaseReference when a BReference is not needed
Reduces complexity and is actualñly more readable.
This commit is contained in:
@@ -56,7 +56,7 @@ BitmapDrawingEngine::SetSize(int32 newWidth, int32 newHeight)
|
||||
fHWInterface = NULL;
|
||||
}
|
||||
|
||||
fBitmap.Unset();
|
||||
fBitmap->ReleaseReference();
|
||||
|
||||
if (newWidth <= 0 || newHeight <= 0)
|
||||
return B_OK;
|
||||
|
||||
@@ -25,7 +25,7 @@ virtual ~BitmapDrawingEngine();
|
||||
private:
|
||||
color_space fColorSpace;
|
||||
BitmapHWInterface* fHWInterface;
|
||||
BReference<UtilityBitmap> fBitmap;
|
||||
UtilityBitmap* fBitmap;
|
||||
BRegion fClipping;
|
||||
};
|
||||
|
||||
|
||||
@@ -791,7 +791,7 @@ Tab::CompareFunction(const Tab* tab1, const Tab* tab2)
|
||||
|
||||
SATGroup::SATGroup()
|
||||
:
|
||||
fLinearSpec(new(std::nothrow) LinearSpec(), true),
|
||||
fLinearSpec(new(std::nothrow) LinearSpec()),
|
||||
fHorizontalTabsSorted(false),
|
||||
fVerticalTabsSorted(false),
|
||||
fActiveWindow(NULL)
|
||||
@@ -806,6 +806,8 @@ SATGroup::~SATGroup()
|
||||
debugger("Deleting a SATGroup which is not empty");
|
||||
//while (fSATWindowList.CountItems() > 0)
|
||||
// RemoveWindow(fSATWindowList.ItemAt(0));
|
||||
|
||||
fLinearSpec->ReleaseReference();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ public:
|
||||
SATGroup();
|
||||
~SATGroup();
|
||||
|
||||
LinearSpec* GetLinearSpec() { return fLinearSpec.Get(); }
|
||||
LinearSpec* GetLinearSpec() { return fLinearSpec; }
|
||||
|
||||
/*! Create a new WindowArea from the crossing and add the window. */
|
||||
bool AddWindow(SATWindow* window, Tab* left,
|
||||
@@ -321,7 +321,7 @@ protected:
|
||||
WindowAreaList fWindowAreaList;
|
||||
SATWindowList fSATWindowList;
|
||||
|
||||
BReference<LinearSpec> fLinearSpec;
|
||||
LinearSpec* fLinearSpec;
|
||||
|
||||
private:
|
||||
TabList fHorizontalTabs;
|
||||
|
||||
Reference in New Issue
Block a user