Appropriate way to use retain/release with Javascript bindings.

I’m writing targeting cocos2d-html5 but trying to write it so that it can also leverage the native bindings for cocos2d-x with minimal (or ideally no) code changes.

The only part I’m a little unsure about and couldn’t find any information on is using retain/release as I did when writing in C*+ targeting cocos2d-x.
Based off the comments in cocos2d-html5, it sounds like I still need to use retain/release. Which is fine, I can use retain during all the inits, but I’m not sure when to call release. When writing in C*+ I did all the of releases in the object’s destructor but there doesn’t appear to be a destructor in the inheritance mechanism used by cocos2d-html5 ( I see ctor but that’s it)?

Basically my question is when is the appropriate place to call release on an object that has been retained in javascript?

Thanks!
C.J.