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