Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #8692

Re: JNI C++ Wrapper

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail
From Roedy Green <see_website@mindprod.com.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: JNI C++ Wrapper
Date Mon, 10 Oct 2011 14:54:13 -0700
Organization Canadian Mind Products
Lines 20
Message-ID <j9q6975356qvu9pn63nd0sc82auic9dot9@4ax.com> (permalink)
References <j64ddd$h8v$1@online.de>
Reply-To Roedy Green <see_website@mindprod.com.invalid>
NNTP-Posting-Host RCd/Ul4tyxGUBII8WGwa5g.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
X-Notice Filtered by postfilter v. 0.8.2
X-Newsreader Forte Agent 6.00/32.1186
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8692

Show key headers only | View raw


On Fri, 30 Sep 2011 14:41:17 +0200, Philipp Kraus
<philipp.kraus@flashpixx.de> wrote, quoted or indirectly quoted
someone who said :

>Is there a solution to avoid any memory leaks with the dtor call in the 
>JNI calls or any "default structure" to create a wrapper around C++
>objects?

Inside your C++ method you must destroy objects you create, or you
must later do a Java call to some C++ code that kills them. You can
use addShutDownHook in Java to arrange for code to run at shutdown.
-- 
Roedy Green Canadian Mind Products
http://mindprod.com
It should not be considered an error when the user starts something
already started or stops something already stopped. This applies
to browsers, services, editors... It is inexcusable to 
punish the user by requiring some elaborate sequence to atone,
e.g. open the task editor, find and kill some processes.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar


Thread

JNI C++ Wrapper Philipp Kraus <philipp.kraus@flashpixx.de> - 2011-09-30 14:41 +0200
  Re: JNI C++ Wrapper Roedy Green <see_website@mindprod.com.invalid> - 2011-10-10 14:54 -0700

csiph-web