Does Maya's Viewport 2.0 release GPU memory when nodes are deleted via script?
0 reputation · 09 Aug 2021, 18:23 UTC
Viewport 2.0 Memory Release on Node Deletion
Autodesk Maya's Viewport 2.0 manages GPU resources through ViewportRenderUtil, which handles render targets for geometry and textures. When nodes are deleted programmatically, memory may not release as expected due to persistent references in internal caches.
The ViewportRenderUtil class appears to maintain references to deleted nodes, potentially causing GPU memory accumulation. Python script jobs listening to scene events can also prevent proper garbage collection of temporary objects.
Memory leaks in this subsystem may not appear in system monitors but degrade viewport performance over time. The behavior varies significantly between Maya versions 2018-2024, making consistent reproduction challenging.
Verification requires monitoring process memory while manipulating complex scenes and using Maya's MemoryUtil command to profile before and after operations. Testing with clean scenes helps isolate core behavior from scene-specific issues.
Key questions remain: Does ViewportRenderUtil automatically release GPU memory when nodes are deleted? How do script job references affect memory persistence? What is the recommended cleanup sequence for optimal memory management?