openwebwork/webwork2-dev — pull request #67 by dpvc (2012-11-04 20:39:31+00:00)
Title: Resolve "Can't locate package ... " errors for MathObjects like LimitedPolynomial

This patch adds a `free` method to the `WeBWorK::PG`` object that will free up the data that could include MathObjects so that it will not cause the "Can't locate package ... " error messages in the log files. The free method is called by `Problem.pm` after the page is printed so that the pg data aren't passed up the chain to the WeBWorK::dispatch routine where garbage collection causes the error to occur when that routine ends.

The `GatewayQuiz.pm` module may need to make similar calls. I have verified that the LibraryBrowser, Hardcopy, and ProblemSet modules don't need to do this (as they don't store the PG object in their instances. I have never used to GatewayQuiz, and so don't really know how to test it.