def free(engine): if hasattr(engine, "session"): if engine.session: import _cycles _cycles.free(engine.session) del engine.session