I'm creating a binding to a C++ library for NLP. You can see the basic of it here: https://gist.github.com/2331101#
My problem right now is, in Node when the user instantiates my object with the "new" command, in C++ land I instantiate my module's object and then instantiate the Freeling NLP library object so I can call its methods. I try to save that Freeling object inside my module object so I can use it later on within other methods such as tokenize (in this example). I use node::Wrap and node::UnWrap but it seems like either the Freeling object is wrapped properly, garbage collected or I'm left with a dangling pointer to nothing. As a side note, I had a std::string private member on my object just to store some text that I receive as one of my arguments to the "new" command. That was also not saved by the wrap/unwrap methods. I had to make this variable a v8::Persistent<v8::String> in order for it to be properly wrapped. if I can create the Freeling object and call the tokenize method all in one place then it works. If I create the Freeling object in my "new" class method and call the tokenize method in my "tokenize" class method it doesn't work. My library just hangs. I'm running node v.0.7.6 on a Fedora 14 Linux (in a VM on top of Windows) Any help would be greatly appreciated. Thanks, Roy -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
