`SWIG/Examples/python/extend/`

## Implementing C++ callbacks in Java

`$Header: /cvsroot/SWIG/Examples/java/callback/index.html,v 1.1 2003/09/06 15:54:07 cheetah Exp $`

This example illustrates how to use directors to implement C++ callbacks in Java.

Please note that unlike Python, Java does not have an equivalent concept of weak references, so the program has to manually clean up after objects. The implication of this is that the `Caller` class cannot claim ownership of the `Callback` object in `Caller.setCallback()` and delete it.