New director example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5087 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
de82aae067
commit
e871ca2862
6 changed files with 102 additions and 0 deletions
29
Examples/java/callback/index.html
Normal file
29
Examples/java/callback/index.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>SWIG:Examples:java:callback</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#ffffff">
|
||||
|
||||
|
||||
<tt>SWIG/Examples/python/extend/</tt>
|
||||
<hr>
|
||||
|
||||
<H2>Implementing C++ callbacks in Java</H2>
|
||||
|
||||
<tt>$Header$</tt><br>
|
||||
|
||||
<p>
|
||||
This example illustrates how to use directors to implement C++ callbacks in Java.
|
||||
</p>
|
||||
<p>
|
||||
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 <code>Caller</code> class cannot claim
|
||||
ownership of the <code>Callback</code> object in <code>Caller.setCallback()</code>
|
||||
and delete it.
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue