Thank you, that make sence. :)

I have a real world bug related this, it is troubled me for long time, please 
give me some hints if possible.

The real world program like this:

I have an big ref object named as BigObj, which I pass to several children 
thread with pointer, because I don't want it is to be copied. The BigObj is 
readonly both in main thread and children thread, and main thread will wait 
till all children thread finish there job. Now the problem comes, in the child 
thread, If I use closure to access the BigObj, after some iteration, the BigObj 
is freeed(The inner data changed so I think the only possible reason is it be 
freeed); if I use template, the program works fine. If I use the closure and 
add an GC_Ref(BigObj) call, the program works fine too.

So, what is possible reason for this? 

Reply via email to