Jump to content

Inline cpp memory leak


Wolf-S

Recommended Posts

Hello all,

Houdini seems to be eating up 1 MB of memory per execution of this Python operator:

import inlinecpp 

iterations = inlinecpp.createLibrary(name="cpp_heat_iteration_library", includes = """ 

#include <GU/GU_Detail.h> 

""", function_sources=[""" 
void iterate(GU_Detail *geo){ 
    return; 
    // stuff 
} 
"""]) 

geo = hou.pwd().geometry() 
iterations.iterate(geo)

There's a bunch of stuff after 'return;', but I've narrowed it down to this and it's still eating 1 MB of memory per execution. Is there something I'm doing wrong?

I have a particle system, amongst others, connected to this node which makes all the difference. Once it's off, it doesn't eat up memory. It makes no sense...

Edit: To add to this, said POP network only creates 1024 particles from a grid - nothing too complicated.

Edited by Wolf-S
Link to comment
Share on other sites

  • 2 weeks later...

its a known problem.

in your last line where you call the function, replace geo with hou.pwd().geometry(). don´t ask for the geometry outside the inlinecpp-function.

see attached file!

petz

Thank you, that works.

P.S. I've since switched to compiling non-inlinecpp with hcustom and haven't had problems yet.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...