Here, a lot of "depends", starting from what your code does for the browser in which you work. However, if your JIT object is compiled so as not to use the map for its attributes, then the number must be an 8-byte double stored inline inside the object. Dropping does nothing.
The string and myclass instance will be a pointer to memory allocated outside the object (since the string can be too many bytes, it cannot be stored inside the object. The compiler can apparently store one instance of the string in memory and never free it, however) . Disabling them may allow the garbage collector to free them before the main object goes beyond.
However, the real question is why are you worried about this. If you did not profile your code and did not detect garbage collection or memory leak as a problem, you should not try to optimize the behavior of the GC. In particular, if your myobj object itself will live for a long time, you should not worry about resetting the fields. GC will collect it when it goes beyond.
source share