mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 03:05:34 +00:00
Fix leak by giving base class a virtual destructor (and counting the constructor). r=jfrancis@netscape.com
This commit is contained in:
parent
5cfaaa1ec6
commit
dc59bf9530
@ -40,6 +40,8 @@ class nsRulesInfo
|
||||
int action;
|
||||
};
|
||||
|
||||
MOZ_DECL_CTOR_COUNTER(nsEditRules);
|
||||
|
||||
/***************************************************************************
|
||||
* Interface of editing rules.
|
||||
*
|
||||
@ -47,6 +49,8 @@ class nsRulesInfo
|
||||
class nsEditRules
|
||||
{
|
||||
public:
|
||||
nsEditRules() { MOZ_COUNT_CTOR(nsEditRules); }
|
||||
virtual ~nsEditRules() { MOZ_COUNT_DTOR(nsEditRules); }
|
||||
NS_IMETHOD Init(nsHTMLEditor *aEditor, PRUint32 aFlags)=0;
|
||||
NS_IMETHOD BeforeEdit(PRInt32 action, nsIEditor::EDirection aDirection)=0;
|
||||
NS_IMETHOD AfterEdit(PRInt32 action, nsIEditor::EDirection aDirection, PRBool aSetSelection)=0;
|
||||
|
@ -40,6 +40,8 @@ class nsRulesInfo
|
||||
int action;
|
||||
};
|
||||
|
||||
MOZ_DECL_CTOR_COUNTER(nsEditRules);
|
||||
|
||||
/***************************************************************************
|
||||
* Interface of editing rules.
|
||||
*
|
||||
@ -47,6 +49,8 @@ class nsRulesInfo
|
||||
class nsEditRules
|
||||
{
|
||||
public:
|
||||
nsEditRules() { MOZ_COUNT_CTOR(nsEditRules); }
|
||||
virtual ~nsEditRules() { MOZ_COUNT_DTOR(nsEditRules); }
|
||||
NS_IMETHOD Init(nsHTMLEditor *aEditor, PRUint32 aFlags)=0;
|
||||
NS_IMETHOD BeforeEdit(PRInt32 action, nsIEditor::EDirection aDirection)=0;
|
||||
NS_IMETHOD AfterEdit(PRInt32 action, nsIEditor::EDirection aDirection, PRBool aSetSelection)=0;
|
||||
|
Loading…
Reference in New Issue
Block a user