Skip to content

Memory leak in CPU and GPU #11

@ijreil

Description

@ijreil

I’m building an application where Unity would send one texture to VVVV via Spout. Working on it, I’ve noticed that every time I kill Unity player, and reopen it again (no matter how much time passed) while leaving VVVV running, there are 15 Mb more or less that always sum up to the memory.

I first thought it could be VVVV related, so been playing with fromsharedtexture node to see if I could find out anything, but I haven’t. So I’ve made some tests in a PC with AMD Radeon E8860 dedicated Graphics and Unity 5.3.4f1 version:

  • SENDER IN UNITY EDITOR: I’ve tried the Unity Spout Demo alone, in Editor, just playing and stoping and the memory leak is present. Also, not only memory is added to the Ram, but also to the GPU. I’ve tried with simpleSender scene and with Spout2 Sender scene, both add 15 MB to CPU and GPU each time I hit play after previous stop.
  • SENDER COMPILED, NO UNITY EDITOR: Next, what I have done is compile those scenes to try them without Editor. This time, executing the compiled scenes there has been no leak, tried executing and killing them several times but no memory has been added to Ram nor GPU.
  • SENDER COMPILED , NO UNITY EDITOR + VVVV RECEIVER: Next, I have opened VVVV receiver to test the compiled scenes from the previous test with a receiver opened. This time there has been leak, same as before, 10-15 MB are added to both, CPU and GPU, each time I execute and stop the compiled scene, with receiver remaining opened and rendering.

Looking at logs, I've seen that Awake from Spout scripts executes again after onDisable, so maybe here is the problem? A bunch of new objects is created and not liberated anymore?

What I can't understand is why, when Script is compiled there is no leak when VVVV receiver is not present and rendering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions