Make sure stub-derived elements get destroyed properly by adding a virtual destructor. r=dbaron.

This commit is contained in:
bryner%brianryner.com 2005-01-15 01:09:16 +00:00
Родитель c42324ab83
Коммит 8041a50973
1 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -51,6 +51,13 @@
*/
class nsXFormsStubElement : public nsIXTFGenericElement
{
protected:
// We need a virtual destructor so that when a subclass does
// NS_IMPL_ISUPPORTS_INHERITED, our Release() implementation calls the
// derived class destructor.
virtual ~nsXFormsStubElement() {}
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIXTFELEMENT
NS_DECL_NSIXTFGENERICELEMENT
@ -66,6 +73,13 @@ class nsXFormsStubElement : public nsIXTFGenericElement
*/
class nsXFormsXMLVisualStub : public nsIXTFXMLVisual
{
protected:
// We need a virtual destructor so that when a subclass does
// NS_IMPL_ISUPPORTS_INHERITED, our Release() implementation calls the
// derived class destructor.
virtual ~nsXFormsXMLVisualStub() {}
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIXTFELEMENT
NS_DECL_NSIXTFVISUAL