slipster216 / VertexPaint

Unity 5.3 Vertex Painter
Other
906 stars 151 forks source link

Resources leak #1

Closed apautrot closed 8 years ago

apautrot commented 8 years ago

Hi I have spot two resources leaks. Leaks are issuing message in the editor log. They are not a big issue but could be annoying by spamming the log.

Both could be solved by using hideFlags member (see http://answers.unity3d.com/questions/643942/how-does-setting-the-hideflags-resolves-leaking-is.html).

1) The Mesh created in VertexInstanceStream.Apply is leaking. To solve this, after its instanciation, add the following line m.hideFlags = HideFlags.DontSave;

1) The Material created in VertexPainterWindow.UpdateDisplayMode is leaking. To solve this, after its instanciation, add the following line vertexShaderMat.hideFlags = HideFlags.DontSave;

Best regards.

slipster216 commented 8 years ago

Fixed, thanks!