diff --git a/site/source/docs/porting/connecting_cpp_and_javascript/embind.rst b/site/source/docs/porting/connecting_cpp_and_javascript/embind.rst index 55fb4d854e2d4..d481604ee93ae 100644 --- a/site/source/docs/porting/connecting_cpp_and_javascript/embind.rst +++ b/site/source/docs/porting/connecting_cpp_and_javascript/embind.rst @@ -361,6 +361,11 @@ The JavaScript code does not need to worry about lifetime management. var person = Module.findPersonAtLocation([10.2, 156.5]); console.log('Found someone! Their name is ' + person.name + ' and they are ' + person.age + ' years old'); +.. note:: + Fields that correspond to bound C++ objects (such as ``class_``) produce JavaScript + properties that are handles to C++ state. Those properties obey the normal lifetime + rules of their bound type and may require explicit cleanup in JavaScript. + See :ref:`Object Ownership ` for more details. Advanced class concepts =======================