Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8719151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:43:23+00:00 2026-06-13T06:43:23+00:00

When I create a native implementation peer in c++ how can I ensure that

  • 0

When I create a native implementation peer in c++ how can I ensure that native part is also deleted when java object is deleted by JVM? I can add some methods that user of java object has to call explicitly, but I’d like to know if there some hook that I could put to handle when java object is deleted (garbage collected) so that I can automatically delete c++ implementation object as well.

I reviewed JACE it seems that it does that, but I’d need to run PeerEnhancer to patch generated class file (probably that’s how it hooks delete? or maybe it needs this patching for something else). However, I’d like to avoid messing with compiled java files, I don’t want anything fancy

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:43:26+00:00Added an answer on June 13, 2026 at 6:43 am

    This is a rare case where you should really use a finalizer, but you should also make your Java class Closeable as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create my own Native win32 C++ Checkbox that can have
Can I create a native thread on Windows running MRI, using the CreateThread API
I'm trying to learn qmake, but can't find a native way to create .pri
I'm using RabbitMQ and trying to refactor my current native java implementation to using
I'm looking for some strategic advise on the implementation of an application that supports
I want to create a native (c++) module for node.js which is able to
I use Unmanaged Exports to create a native .dll from .NET .dll so I
To create facebook android native app we need to provide our Android application signature
how to create project for native c++ executable in visual studio 2012. In previous
For my application (an MMC snap-in) I need to create a single native DLL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.