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

    How do you test for memory leaks?

    SDK Help
    0
    4
    358
    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 09/02/2014 at 17:38, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   13,14,15 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      I develop in Visual Studio, until now 2010, but have switched to VS 2012.

      I wonder how you test for memory leaks?
      I tries this Visual Leak Detector, http://vld.codeplex.com/ but got so many problems and C4D crashes, that I gave it up. At least until someone can tell me how to use it in C4D plugins.

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

        On 10/02/2014 at 00:58, xxxxxxxx wrote:

        Hi,

        The debug version of the CINEMA API has automatic memory leak detection.
        To enable it you have to set the command line parameter -g_alloc=debug.
        Debug Information[URL-REMOVED] and Stability and Testing[URL-REMOVED] pages in the C++ documentation contains information about debugging memory leaks.


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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

          On 10/02/2014 at 09:56, xxxxxxxx wrote:

          Originally posted by xxxxxxxx

          Debug Information[URL-REMOVED] and Stability and Testing[URL-REMOVED] pages in the C++ documentation contains information about debugging memory leaks.

          Hi Yannick,
          thanks! It is  a little embarrassing that I have not studied these documents before, but I have been carried away, by all the opportunities there is in the SDK to add great new functions to C4D with plug-ins. I have now come that far that performance optimization and memory leak detection is on the agenda. I learnt a lot reading those documents!


          [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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

            On 10/06/2014 at 02:04, xxxxxxxx wrote:

            Hi Yannick,

            where do I set this parameter? I put it in the "Command Arguments" property on the "Configuration Properties->Debugging" tab (VC Express 2010), but no console window comes up when debugging. Maybe because of running x64?

            Solved: I put an empty c4d_debug.txt file in the working directory and the console window comes up now.

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