Skip to content

Commit

Permalink
nativecall: add DESTROY to example
Browse files Browse the repository at this point in the history
  • Loading branch information
rudis committed Feb 22, 2016
1 parent 7867eca commit 5dab080
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/Language/nativecall.pod
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ by writing a class like this:
$!initialized = False; # prevent double frees
}
}
# Free data when the object is garbage collected.
method DESTROY() {
self.free;
}
}
Note that the CPointer representation can do nothing more than hold a C pointer.
Expand Down

0 comments on commit 5dab080

Please sign in to comment.