manpagez: man pages & more
info bigloo
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5 Weak Pointers

Bigloo may support weak pointers. In order to activate this support, Bigloo must be configured with the finalization enabled. That is, the configure script must be invoked with the option --finalization=yes. When the finalization and weak pointers support is enabled, Bigloo defines the cond-expand properties bigloo-finalizer and bigloo-weakptr. Then a program may test the support with expressions such as:

(cond-expand
  (bigloo-weakptr <something>)
  (else <something-else>))

Weak pointers are pointers to objects which can be collected by the garbage collector if they are weakly pointed to. An object is weakly pointed to if the only pointers to it are weak pointers. Weakly pointed objects can be collected by the garbage collector, and all the weak pointers to such objects will cease to point to it and point to #unspecified instead.

bigloo procedure: make-weakptr data

Creates a weak pointer to data.

bigloo procedure: weakptr? obj

Returns #t if obj is a weak pointer, constructed by make-weakptr.

bigloo procedure: weakptr-data ptr

Returns the data object pointed to by ptr. If the object has been collected, it returns #unspecified.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on March 31, 2014 using texi2html 5.0.

© manpagez.com 2000-2019
Individual documents may contain additional copyright information.