[ai-0.36-79] memory leak fix