I just found some
good thread about this, still makes no sence for me for being used in that code.
After not carefully reading it now I know that:
(vlax-release-object) destroys the pointer of the object, It doesnt destroy the "object" but the memory for that object.
Used (vlax-dump-object), after that (vlax-release-object), and then (vlax-dump-object) again:
_$ (setq e (car (entsel)))
<Entity name: 7ff666a073a0>
_$ (setq o (vlax-ename->vla-object e))
#<VLA-OBJECT IAcadCircle 00000064758ab718>
_$ o
#<VLA-OBJECT IAcadCircle 00000064758ab718>
_$ (vlax-dump-object o)
; IAcadCircle: AutoCAD Circle Interface
; Property values:
...
T
_$ (vlax-release-object o)
0
_$ o
#<VLA-OBJECT 0000000000000000>
_$ (vlax-dump-object o)
; Object is not connected
nil
_$
tried the "inspect tool" after (vlax-release-object):
_$ o
#<VLA-OBJECT 0000000000000000>
_$
Error: null interface pointer: #<VLA-OBJECT 0000000000000000>
_1$
So the conclusion I did: is to "release" any object that is assigned as a local variable inside a function (after its use).
In order to free any pontentially used memory when the routine ends.