Thanks for sharing that.One thing I think I notice in that is that your bindings never take a reference to the callback object. This is not a problem providing the calling application uses it correctly, but should it not then potentially the callback object could be garbage collected and then liblouis may try and call it and things fall over. Is that correct or does JNA do something?
In the LibLouisUTDML bindings I get the bindings to take and hold a global reference to the callback object and only release that reference when lou_registerLogCallback is called again (may it be called with NULL to free the callback or another callback object).
Michael Whapples On 12/06/2014 12:38, Bert Frees wrote:
Hello Michael, I've updated my JNA based Java bindings to support lou_registerLogCallback and lou_setLogLevel. See https://github.com/liblouis/liblouis-java/commit/a30a1ad7212bed369c3ffd651c393ca241f83ae6 if you like to know how I did it. Cheers, Bert For a description of the software, to download it and links to project pages go to http://www.abilitiessoft.com
For a description of the software, to download it and links to project pages go to http://www.abilitiessoft.com