as know when want check if object initialized or not can use isassigned, @ found didn't work generic list tlist. isassigned return true time it's wrong. solution?
an object reference variable of type tlist<t>
no different other object reference. use assigned
other object reference variable.
note assigned
can test initialization of object reference variables have been initialized nil
.
for example, class instance members initialized nil
before instance's constructor starts execute. object references allocated call new
initialized nil
. or set default value assignment default()
.
but object reference variables local variables not initialized nil
. in fact not initialized @ all. likewise object reference variables allocated call getmem
.
the bottom line treatment of object reference variables of type tlist<t>
or indeed other generic class, identical treatment other tobject
descendent.
Comments
Post a Comment