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
    • Recent
    • Tags
    • Users
    • Login

    CheckCache() problem

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 281 Views
    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 Offline
      Helper
      last edited by

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

      On 18/04/2009 at 17:08, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10 / 11 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Hi,

      in my generator I use op->CheckCache(hh) to make sure, the generator's cache is valid. If so, I just return the cache instead of calculation everything again. So far, so good.

      Now the problem:
      I have my generator in a scene in Cinema. Cache is valid, everything fine (I checked in the debugger). Now I open another scene in Cinema. OK. And now I use the Window menu to get back to the scene with my generator.
      All of a sudden, CheckCache() returns another value. Why?

      Also, the SDK documentation sais, GetCache() should return TRUE if the cache is valid. For me, it always returns FALSE if I have a cache. Only after changing the scene (as described above) it returns TRUE. Why??

      Thanks for any help!

      Greetings,
      Jack

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

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

        On 19/04/2009 at 04:50, xxxxxxxx wrote:

        Ideas, anybody? Why is the Cache suddenly invalid after changing to another document?

        Cheers,
        Jack

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

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

          On 19/04/2009 at 08:24, xxxxxxxx wrote:

          Yes, I would expect that the cache is invalid(freed) due to a decision from the memory management. Imagine a scene allocates half of your memory, so if you create a new document (or open a new document) this memory should be freed otherwise your memory would blow up per each document.

          Don't know if there is an option to prevent this deallocation but I wouldn't recommend that at all.

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