"during shutdown the ImageCtx" means I should add code in destructor ImageCtx::~ImageCtx()?