fixed bug 20229; r=beard. Special thanks to patrick for his persistence with leaks.
git-svn-id: svn://10.0.0.236/trunk@55132 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -78,12 +78,21 @@ static void RecycleTokens(nsITokenRecycler* aRecycler,nsDeque& aDeque) {
|
||||
* @return
|
||||
*/
|
||||
nsCParserNode::~nsCParserNode() {
|
||||
if(mRecycler && mAttributes) {
|
||||
RecycleTokens(mRecycler,*mAttributes);
|
||||
if(mAttributes) {
|
||||
|
||||
//fixed a bug that patrick found, where the attributes deque existed
|
||||
//but was empty. In that case, the attributes deque itself was leaked.
|
||||
//THANKS PATRICK!
|
||||
|
||||
if(mRecycler) {
|
||||
RecycleTokens(mRecycler,*mAttributes);
|
||||
}
|
||||
delete mAttributes;
|
||||
mAttributes=0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
NS_IMPL_ADDREF(nsCParserNode)
|
||||
NS_IMPL_RELEASE(nsCParserNode)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user