Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: djaydino on August 14, 2015, 09:45:56 AM

Title: Swap Sprite eating memory
Post by: djaydino on August 14, 2015, 09:45:56 AM
Hi,
i made i video so it is easier to see what happens

Title: Re: Swap Sprite eating memory
Post by: djaydino on August 14, 2015, 04:00:05 PM
Hi,
can someone test if they have the same issue?
and also on a Mac (i am on pc)
Title: Re: Swap Sprite eating memory
Post by: djaydino on August 14, 2015, 04:44:16 PM
Update, also if i use set properties/Sprite/Sprite on a sprite renderer
and add a sprite on it, the memory also goes up every seccond
Title: Re: Swap Sprite eating memory
Post by: sebaslive on August 15, 2015, 03:10:42 PM
tried this out and memory went bananas
Title: Re: Swap Sprite eating memory
Post by: jeanfabre on August 15, 2015, 05:06:34 PM
Hi,

 yep, I can repro this as well. I verified that a regular script exposing a sprite doesn't have memory leak, so something needs to be fixed with the Action inspector system.

 I have reported a bug, so I am sure this will be fixed in the next release. Thanks for the report.

 Bye,

 Jean
Title: Re: Swap Sprite eating memory
Post by: Lane on August 17, 2015, 08:10:31 AM
Recently while doing a custom inspector (unrelated to PM) I made a new white 1x1 Texture2D for color fill in OnInspectorGUI() and left it to GC to cleanup but it was leaving them in memory. Actually threw at error of some kind at me, can't remember what it was. Ended up moving it to OnEnable() (might still even be leaking, but its minuscule).. I wonder if it has always leaked or if this is something new in 5.x?

Either way, can't do anything about this one from within the action unfortunately.
Title: Re: Swap Sprite eating memory
Post by: jeanfabre on August 17, 2015, 02:26:18 PM
Hi,

 Thanks for the infos, I am currently on the case to try isolating the leak issue outside PlayMaker.

 Bye,

 Jean
Title: Re: Swap Sprite eating memory
Post by: Alex Chouls on September 01, 2015, 02:45:18 AM
Turns out this is a Unity bug. Will be fixed in Unity 5.3:
2D : Fix memory leak when using Sprite object field in custom inspector