Made the destructors on some XPCOM objects virtual (and protected) to make sure everything gets cleaned up...

This commit is contained in:
rpotts 1998-06-23 18:44:06 +00:00
parent c0e592da07
commit 1d2f55011f
4 changed files with 8 additions and 4 deletions

View File

@ -29,7 +29,6 @@ class nsScrollingView : public nsView, public nsIScrollableView
{
public:
nsScrollingView();
~nsScrollingView();
NS_IMETHOD QueryInterface(REFNSIID aIID,
void** aInstancePtr);
@ -72,6 +71,9 @@ public:
//private
void ComputeScrollArea(nsIView *aView, nsRect &aRect, nscoord aOffX, nscoord aOffY);
protected:
virtual ~nsScrollingView();
protected:
nscoord mSizeX, mSizeY;
nscoord mOffsetX, mOffsetY;

View File

@ -32,7 +32,6 @@ class nsView : public nsIView
{
public:
nsView();
~nsView();
void* operator new(size_t sz) {
void* rv = new char[sz];
@ -94,6 +93,7 @@ public:
virtual void GetScrollOffset(nscoord *aDx, nscoord *aDy);
protected:
virtual ~nsView();
//
virtual nsresult LoadWidget(const nsCID &aClassIID);

View File

@ -49,7 +49,9 @@ class nsViewFactory : public nsIFactory
NS_IMETHOD LockFactory(PRBool aLock);
nsViewFactory(const nsCID &aClass);
~nsViewFactory();
protected:
virtual ~nsViewFactory();
private:
nsrefcnt mRefCnt;

View File

@ -118,7 +118,7 @@ public:
virtual void SetQuality(nsContentQuality aQuality);
private:
~nsViewManager();
virtual ~nsViewManager();
nsIRenderingContext *CreateRenderingContext(nsIView &aView);
void AddRectToDirtyRegion(nsRect &aRect);
void UpdateTransCnt(nsIView *oldview, nsIView *newview);