fix memory leak when releasing the topologic state object