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

    GetRealSpline()

    SDK Help
    0
    3
    734
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 13/12/2002 at 17:51, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.012 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      GetRealSpline() ::  In the documentation it says that "The created spline object. The object owns the pointed spline." I assume this means that a new object is generated from the function that should eventually be destroyed by me. When I do delete it C4D crashes internally later ( seconds after the operation that uses GetRealSpline ). So the question is if I should be freeing the object returned from GetRealSpline() or if I should use it and never free it?
      darf - bhodiNUT

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 14/12/2002 at 00:51, xxxxxxxx wrote:

        You are the "caller", the object is the "object". So you don't need to destroy the spline returned by GetRealSpline() since the "object" owns it. (If you have created the "object" as well, for example with SendModelingCommand(), then you of course need to destroy that object. But never what is returned from GetRealSpline().)
        If the SDK had said "The caller owns the pointed spline." then it would be as you thought. (Or rather, the documentation would have been wrong... 🙂

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 14/12/2002 at 01:00, xxxxxxxx wrote:

          Uhh, ok. Since the function returns a pointer to an object I got confused. It works...
          Thanks, darf

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