wave7-idisposable-managed-component
CommunityDispose native resources safely on removal
Software Engineering#idisposable#memory-leak#unity-dots#nativearray#ecomponentdata#entity-destroy#cleanup-system
AuthordyCuong03
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill prevents native memory leaks when a managed IComponentData instance owns unmanaged or native resources that must be explicitly released before the component is removed or its entity is destroyed.
Core Features & Use Cases
- Safe native resource cleanup: Ensures NativeArray/NativeList and other IDisposable native holders are disposed at the correct lifecycle boundary (component removal or entity destruction).
- Correct ECS cleanup flow: Provides a canonical approach using a PendingDestroy tag and a cleanup system that calls Dispose and then destroys the entity via an ECB.
- Anti-pattern guidance: Avoids relying on GC for IDisposable, avoids missing explicit Dispose calls, and warns against calling Dispose inside jobs.
Quick Start
Ask the AI to generate a NativeDataComponent cleanup plan using an ECS PendingDestroy tag and a cleanup SystemBase that disposes the component’s native resources before destroying the entity.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: wave7-idisposable-managed-component Download link: https://github.com/dyCuong03/unity-agent-team/archive/main.zip#wave7-idisposable-managed-component Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.