Thank you guys. @Bert > I don't think it makes a difference. You should note that you have to > explicitly manage the lifetime of a persistent handle, e.g. you'd have > to Dispose() it when you no longer need it. Using persistent handles > where locals would be appropriate sounds like a recipe for blowing > your foot off to me.
If I declared a Persistent handle like this: Persistent<Object> someObject = GetObject(); And in the desturctor of the Persistent handle, it will not automatically invoke the Dispose() method? On Thu, May 31, 2012 at 9:12 PM, Bert Belder <bertbel...@gmail.com> wrote: > On May 31, 3:10 pm, Bert Belder <bertbel...@gmail.com> wrote: > > On May 31, 11:04 am, Tony Huang <cnwz...@gmail.com> wrote: > > > > > So may I consider this in this way: > > > > > 1) Objects who is referenced by any Handle will not be disposed. > > > > They *may* be disposed - they will only actually be disposed when v8 > > does a garbage collection (but any v8 API call can trigger a gc, so > > you can't really control when that happens). > > Er, I have to correct myself here. Objects referenced by any handle > will obviously not be disposed. Other object may be disposed at any > time. -- ------------------------------------------------------ Tony Huang cnwz...@gmail.com wz...@hotmail.com wz...@vip.sina.com