www.delorie.com/gnu/docs/guile/goops_52.html   search  
 
Buy GNU books!


Goops Manual

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

3.11.4 Cloning Objects

generic: shallow-clone
method: shallow-clone (self <object>)
Return a "shallow" clone of self. The default method makes a shallow clone by allocating a new instance and copying slot values from self to the new instance. Each slot value is copied either as an immediate value or by reference.

generic: deep-clone
method: deep-clone (self <object>)
Return a "deep" clone of self. The default method makes a deep clone by allocating a new instance and copying or cloning slot values from self to the new instance. If a slot value is an instance (satisfies instance?), it is cloned by calling deep-clone on that value. Other slot values are copied either as immediate values or by reference.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003