Is C4D Supposed To Leak Memory? [CLOSED]
On 19/12/2014 at 12:20, xxxxxxxx wrote:
Cinema 4D Version: 13
Platform: Windows ;
Language(s) : C++ ;
While using the Windows Task Manager to monitor the memory I'm using in my plugin. I discovered something alarming.
According to the TM.
C4D is eating memory whenever the mouse is moves around.
I'm guessing that the source for this is a CoreMessage?
The amount of memory leaking is small. But still, this seems like a very bad thing.
I shut down my computer every night. And re-start it in the morning. So this small memory consumption doesn't hurt me.
But what about people who are leaving their computers on for long periods of time?
Wouldn't this eventually cause a problem?
On 19/12/2014 at 12:57, xxxxxxxx wrote:
in short: No, Cinema 4D is not supposed to leak memory.
Actually our developers at MAXON invest quite an amount of time to make sure, C4D does not leak memory.
You should be aware, that the Windows Task Manager is neither a profiling tool nor is it well suited to research such a situation. As far as I know, there are mechanisms in Win's memory management, which delay deallocation of memory as long as enough system resources are available (this has some advantages, if an application reuses lots of small memory blocks all the time).
So, the TM might not necessarily point to a memory leak.
I'm not saying C4D is perfect and bugs may happen, but I can't reproduce it here either.
With which Cinema 4D version are you experiencing this behavior?
Are there any active plugins? If so, please try again without any plugins.
And finally have a look in my article on debugging and try some of the methods described (debug mode, Memory statistics), to see if there's a real memory leak.
On 19/12/2014 at 13:22, xxxxxxxx wrote:
I'm still using R13.
It doesn't matter if there's no plugins installed. The memory usage in the TM increases while mousing.
I just tried it using the R16 demo. And it doesn't seem to do this. So maybe this was something Maxon has fixed since then?
However. The memory size does still jump whenever creating objects. Which is not quite as bad. But still a little bit concerning.
I usually use the "c4d_debug.txt" file method to debug my R13 plugins. And I take it on faith that it's correctly flagging memory leaks properly.
But I was following a raw C++ tutorial today using C4D instead of the Windows Command window. And that's when I noticed the mouse eating memory in the TM. And it surprised me.
I'm wondering if the Windows Task Manager is showing this memory usage correctly?
Or if it was not something that can be trusted?
I have not been able to connect to: https://developers.maxon.net/ for a few days now.
On 19/12/2014 at 14:56, xxxxxxxx wrote:
I wouldn't worry too much.
The memory checking of C4D's debug mode is actually pretty precise and trustworthy. At least as long as you only use C4D's own functions for memory allocation. And as I wrote before, the Task Manager is not really suited to detect memory leaks. It may give you a rough idea, but that's all.
Regarding "memory size does jump, when creating objects": Rest assured, that is normal. C4D needs to allocate memory for the object. After all it needs to store the vertices and polygons of the object (plus loads of other information) somewhere.
Regarding not being able to reach developers.maxon.net: We are not aware of any problems. And for me it's working fine right now. Which browser are you using? I remember, we had another thread, where some links I gave to you, didn't work on your side either. I think, it may be worth investing some time to investigate this on your end.
On 19/12/2014 at 17:37, xxxxxxxx wrote:
I still think that the memory climbing by moving the mouse is a leak.
But it seems to have been fixed somewhere along the way. So I guess it's just something I'll need to be mindful about.
I'm using an older version of Firefox because I hate the newer versions.
I just checked the site with a new version of chrome and it seems to load fine. So I guess it's a browser problem.
The strange thing is it was working just fine for me with my older browser up until a few days ago.
The same with the links you sent me, but the opposite. They just suddenly started working.
My browser seems to work whenever it wants to these days. Maybe it joined a Union.
Seems like everyone is hell bent on forcing me to upgrade all the things I like: FireFox15, Vista, C4DR13, VS2010, etc..
But I don't want to upgrade them. I like what I'm using.
I'm old. And I like my old stuff more than the new stuff. Stop forcing me to change dag-nabit!
Oh yeah. One more thing...You kids stay off my lawn too.