Fixing memory leak on grid node. It is a temporary fix, LoggingManager
needs to be rethinked as the whole. Fixes issue 4969