I am worried in memory Leake.

This simple code make no leak.

function (__number out) main (__number time)
{
var result = new Object()
result.out = time * 10;
return result
}

Here "time" input to main is output from System time.

But following code for mesh drawing cause memory leak.

var _Vertices = []
var _Colors = []
var count = 0

function (__structure Vertices, __structure Colors, __number count) main
(__number time)
{
var result = new Object()
 var ix = 0;
var a = 0.5
_Vertices [ix ++] = [ -a, -a, 0 ];
_Vertices [ix ++] = [ a, -a, 0 ];
_Vertices [ix ++] = [ -a, a, 0 ];
_Vertices [ix ++] = [ a, a, 0 ];
ix = 0;
_Colors [ix ++] = [1, 0, 0, 1.0]
_Colors [ix ++] = [0, 1, 0, 1.0]
_Colors [ix ++] = [0, 0, 1, 1.0]
_Colors [ix ++] = [1, 1, 1, 1.0]

result.Vertices = _Vertices
result.Colors = _Colors
result.count = count ++;
return result
}

Patch is like this:

    System Time -- JavaScript -- Mesh Creator -- Mesh Renderer

Here "time" input to main is not uses anywhere. "count" output is connected
to X Rotation of
Mesh Renderer.
When I disconnect time input, no leak occurs.
Does memory leak comes from structures?

Actual my javaScript is more complex, so more memory leak occurs.
Should I give up JavaScript and use Objective-C?


Regards,
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to