Added CObjectManager::Flush()

Possible fix for #275