Mateusz,
I'd like you to review these changes and apply them if they seem appropriate.
Note, please ensure that the XMLPlatformUtils::Terminate() does not interfere with other GMLReader's that may be active at the same time. So try tests where two GML datastores are open at the same time. Close one, and then verify you can still read from the other.
I suspect the patch will have to be changed to keep track of how many GMLReader's are active, and only call the Terminate() when the last one is destroyed. Presumably that logic should also set m_bXercesInitialized to FALSE.
Since this is low priority and a bit risky as a change, I'd like to hold it to trunk, not the stable branch.