Chad,

I actually worked around this by using a C interface.

My use case was to return a pointer managed by the C++ layer to JS.  This
pointer is later used to query data and such, but the class itself is
cleaned up under its own terms.  The class is deallocated by a friend class.

Thanks for the response!


On Thu, Apr 10, 2014 at 2:53 PM, Chad Austin <[email protected]> wrote:

> Hi Joshua,
>
> If you expose a class without a destructor, how can that instance get
> deallocated?
>
> If embind is storing bookkeeping data for each C++ object exposed to
> JavaScript, how would embind know to clean that up?
>
> Can you explain your use case in some more detail?
>
> Thanks!
> Chad
>
>
>
> On Tue, Apr 8, 2014 at 6:38 PM, Joshua Litt <[email protected]> wrote:
>
>> I am trying to build a library with embind, and I have found the docs and
>> test file quite helpful.
>>
>> However, I have run into an issue.  One of the classes I need to provide
>> an interface for has a private destructor.  I can probably just wrap the
>> class, but that will be quite time consuming.  Is there anyway to tell
>> embind not to call the classes destructor?  Right now I get compiler errors.
>>
>> Any help would be appreciated.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Chad Austin
> Technical Director, IMVU
> http://engineering.imvu.com <http://www.imvu.com/members/Chad/>
> http://chadaustin.me
>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "emscripten-discuss" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/emscripten-discuss/F1U123cLVMg/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to