/// <summary>
        ///     Adds a reference to the object.
        /// </summary>
        /// <remarks>
        ///     This only needs to be called on objects that are not going to be stored somewhere on
        ///     the stack. Calling AddRef ensures that the JavaScript object the value refers to will not be freed
        ///     until Release is called
        /// </remarks>
        /// <returns>The object's new reference count.</returns>
        public uint AddRef()
        {
            uint count;

            Native.ThrowIfError(Native.JsAddRef(this, out count));
            return(count);
        }
Example #2
0
 /// <summary>
 ///     Adds a reference to the object.
 /// </summary>
 /// <remarks>
 ///     This only needs to be called on objects that are not going to be stored somewhere on
 ///     the stack. Calling AddRef ensures that the JavaScript object the value refers to will not be freed
 ///     until Release is called
 /// </remarks>
 /// <returns>The object's new reference count.</returns>
 public UInt32 AddRef()
 {
     Native.ThrowIfError(Native.JsAddRef(this, out UInt32 count));
     return(count);
 }