Commit 4a324484 authored by Pino Toscano's avatar Pino Toscano
Browse files

free some objects (thus leak less)

parent 0f4e7791
......@@ -3460,6 +3460,8 @@ void Gfx::opXObject(Object args[], int numArgs) {
// No OC entry - so we proceed as normal
} else if (obj2.isRef()) {
if ( ! catalog->getOptContentConfig()->optContentIsVisible( &obj2 ) ) {
obj2.free();
obj1.free();
return;
}
} else {
......
......@@ -174,6 +174,7 @@ bool OCGs::optContentIsVisible( Object *dictRef )
dictRef->fetch( m_xref, &dictObj );
if ( ! dictObj.isDict() ) {
printf( "Unexpected oc reference target: %i\n", dictObj.getType() );
dictObj.free();
return result;
}
dict = dictObj.getDict();
......@@ -216,6 +217,7 @@ bool OCGs::optContentIsVisible( Object *dictRef )
}
}
dictType.free();
dictObj.free();
// printf("visibility: %s\n", result? "on" : "off");
return result;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment