From 2fb4fefee6de42d387d09cb5ea9dce4ac0016034 Mon Sep 17 00:00:00 2001 From: "rbs%maths.uq.edu.au" Date: Sun, 6 Jan 2002 19:40:04 +0000 Subject: [PATCH] Fix leaky style context git-svn-id: svn://10.0.0.236/trunk@111452 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/mathml/base/src/nsMathMLChar.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mozilla/layout/mathml/base/src/nsMathMLChar.h b/mozilla/layout/mathml/base/src/nsMathMLChar.h index 19a2c2a2f87..2fd005729f3 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLChar.h +++ b/mozilla/layout/mathml/base/src/nsMathMLChar.h @@ -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; }