curiosity-inc / azure-kinect-dk-unity

Azure Kinect C# wrapper compatible both with Sensor SDK and Body Tracking SDK ant Unity sample project using it.
126 stars 30 forks source link

Memory Leak #11

Open Prakash19921206 opened 5 years ago

Prakash19921206 commented 5 years ago

I'm using Unity 2019.1.11f1 Azure Kinect Sensor SDK v1.1.0 Body Tracking SDK 0.9.0 CUDA v10.0 Cudnn v7.5.1.10

Once i start unity, for every second i see 100mb increase in ram usage. Quickly full 16GB ram is filled up. how to avoid this memory leak ?

SethKaminski commented 5 years ago

https://github.com/curiosity-inc/azure-kinect-dk-unity/blob/04cd54d1019334bf28bb11430459cf212f3a8e24/unity/Assets/AzureKinectDK/Examples/Scripts/DebugRenderer.cs#L59

It's creating a new 720p Image every frame. This can be fixed by just adding an image to the project, setting it to then set that to the capture.Color.