[Fluxus] shader-source memory leak
gabor papp
gabor.lists at mndl.hu
Wed Jan 5 06:22:48 PST 2011
hi,
i think i found a memory leak with shaders. these shaders cannot be
cached, so (clear-shader-cache) does not help. (collect-garbage) does
not solve this either, because no scheme objects are created. and even
if they were, i'm not sure how deleting the scheme object would delete
the c++ shader object. maybe by registering a finalizer function, that
we haven't done anywhere in fluxus yet, i think.
memory leak example script:
(clear)
(every-frame
(with-state
(shader-source
"void main(void)
{
gl_Position = ftransform();
gl_FrontColor = gl_Color;
}"
"void main(void)
{
gl_FragColor = gl_Color;
}")
(draw-cube)))
any ideas how we should deal with this issue?
best,
gabor
More information about the Fluxus
mailing list