Notifications
Clear all

[Closed] How to clean the memory ?

Hi,

I have a problem, and this is an example =>

  1. I open 3Ds max and a new script
  2. I make a script :

fn test =
( print 2
)

registerTimeCallback test

  1. I evaluate the script
  2. I press the Play button on my timeline
  3. In my listener appears :

2
2
2

  1. Everything is alright !

  2. I close the script and I delete everything in my listener

  3. I make a new script :


fn test2 =
( print 3
)

registerTimeCallback test2

  1. I evaluate the script
  2. I press the Play button on my timeline
  3. In my listener appears :

2
3
2
3
2

  1. This is not what I had expected !
  2. I wanted :

3
3
3

=> So my problem is that parts of a previous script stay !
Can anyone help me with this problem ?
Because I always have to reboot 3Ds max when I make changes to my script (debug).

Thanks

Greets
Zombie

1 Reply

Each new callback you add is executed on top of any existing registered callbacks. You need to unregister any callbacks you no longer wish to be called. Details about how to do so should be in the online help.

RH