arrays - Does the fill pointer affect GC? -


if have struct:

(defstruct foo   (x 0 :type 'fixnum)) 

and array:

(defvar arr (make-array 0 :element-type 'foo :adjustable t :fill-pointer 0)) 

and following:

(vector-push-extend (make-foo) arr) (setf (fill-pointer arr) 0) 

is foo in array candidate gc?

i understand clhs not active, unsure of implications of state.

elements beyond fill pointer still accessible, , not garbage collected. elements beyond fill pointer aren't printed when print array, , they'll overwritten if use array-push (since uses fill pointer determine add new element), other operations on array treat them normally.

for instance, specification of aref says:

aref ignores fill pointers. permissible use aref access array element, whether active or not.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

android - Keyboard hides my half of edit-text and button below it even in scroll view -