Fix leaky style context

git-svn-id: svn://10.0.0.236/trunk@111452 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rbs%maths.uq.edu.au
2002-01-06 19:40:04 +00:00
parent 785de1f5f1
commit 2fb4fefee6

View File

@@ -63,6 +63,11 @@ public:
~nsMathMLChar() { // not a virtual destructor: this class is not intended to be subclassed
MOZ_COUNT_DTOR(nsMathMLChar);
// there is only one style context owned by the "root" char
// and it may be used by child chars as well
if (!mParent) { // only the "root" need to release it
NS_IF_RELEASE(mStyleContext);
}
if (mSibling) {
delete mSibling;
}