Really fix leak in ResourceMgr..