refs #6447 Added pDoc->release()

Hate to use features I do not understand to the code I have not written but it seems does not do any harm
Merge branch 'feature/6447_UnitTest4MDBoxTree' into develop