Reviewers: Søren Gjesse,

Description:
Update comment in the API to explicitly state that the handle returned
from Context::New is persistent and has to be disposed at some point
in order to allow garbage collecting the context.


Please review this at http://codereview.chromium.org/2220003/show

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     include/v8.h


Index: include/v8.h
===================================================================
--- include/v8.h        (revision 4716)
+++ include/v8.h        (working copy)
@@ -2901,7 +2901,12 @@
    */
   void ReattachGlobal(Handle<Object> global_object);

-  /** Creates a new context. */
+  /** Creates a new context.
+   *
+   * Returns a persistent handle to the newly allocated context. This
+   * persistent handle has to be disposed when the context is no
+   * longer used so the context can be garbage collected.
+   */
   static Persistent<Context> New(
       ExtensionConfiguration* extensions = NULL,
       Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(),


--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev

Reply via email to