Notifications
Clear all

[Closed] 3dsmax Memory Leak ?

It’s possibly to do with the undo record being generate for your entire script. Try running it with this code as well

with undo off (
 
 
 )

ps hmmm i appear to have time travelled.

5 Replies
for i = 1 to 1000000 do (p = point();delete p)

This simple loop causes 3dsmax to allocate all available system memory.
From my point of view, there is nothing wrong in the code.
I create an object and delete it right after.

Thank you,

my mistake, of course.

but what do you expect to get? the point function creates new node which needs some memory allocation; the delete functions deletes the node and it needs another chunk of memory to keep undo record. The creation of 1,000,000 node instances in one pass kills max for sure.

I’ve been testing functions library I wrote. Before each testing function call I create some mock data ( 10 point helpers) and when function is done I remove it from the scene. Each test is called 20 times, so 20 creations of 10 point helpers and 20 removals. Without disabling undo, each tested function runs slower and slower.

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

sorry, i don’t get the point. the doing some operations without UNDO makes the performance better and the memory leaking less. there’s no doubt.