Thanks for taking time. It's really big help. I understand what exactly 
happened.

best regards

- lee

在2022年6月26日星期日 UTC+8 05:11:29<se...@liao.dev> 写道:

> Maybe it's clearer if you look at what's happening like this 
> https://go.dev/play/p/jAia9OPJfbY
>
> The arguments to defer are evaluated immediately, but the execution only 
> happens later
>
> - sean
>
> On Sat, Jun 25, 2022, 21:40 Lee Chou <mozart...@gmail.com> wrote:
>
>> Hello,
>>
>> https://go.dev/play/p/J1tVplkIrjt  
>>
>> why o1.Ref print `2` but p1.Ref print `1` ? 
>> why o1.Ref print `2` but o2.NonRef print `3` ? it's so confused.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golang-nuts...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/19cbb40a-b21a-4dd5-964d-7921095de33dn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/golang-nuts/19cbb40a-b21a-4dd5-964d-7921095de33dn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/30cf2594-151f-4452-bb4d-7efd0a5dd0e7n%40googlegroups.com.

Reply via email to