Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    ViewportSelect.PickObject() memory leak ?

    SDK Help
    0
    1
    152
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 16/06/2013 at 02:05, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   r14 
      Platform:      
      Language(s) :     C++  ;   PYTHON  ;

      ---------
      Hi,

      I am not absolutely sure that this problem is caused by the SDK but i have been running 
      into a strange behaviour regarding ViewportSelect.PickObject(). I have a toolset of python 
      ToolData tools which were single object selection only until now. I wanted to extended them 
      with the capability to run with multiple object selections. So i added the PickObject() method 
      to my tools BaseClass.

      But when I run any of my tools now my ram is flooded extremely fast. The speed depends on 
      the scene size and the size of the multiple object selection. It looks like the ViewportSelect is 
      allocating some memory for the object list passed to PickObject() and doesn't free that memory. 
      I have tried multiple variations of my BaseClass, in which the ViewportSelect is actually a class 
      member to throttle unnecessary re initialization of the vpselect object. Here is a version stripped
      down as much as possible where the vpselect is not a class member to avoid any problems 
      caused by that.

      Am I doing something fundamentally wrong, or is this just a bug ? Thanks for reading,

      Happy rendering,
      Ferdinand

      Hm,

      it seems that I have solved the problem for now by not making the viewportselect object a 
      class member, but that should be mentioned in the docs, as the only thing that keeps
      vpselect from freezing the computer is the python garbage collector.

      happy rendering,
      ferdinand

      1 Reply Last reply Reply Quote 0
      • First post
        Last post