Re: Destructor not called for ref object

2020-04-05 Thread lscrd
As far as I know, the default has not changed in 1.2. It’s better as some programs will not work with `--gc:arc` without changes (if you have created cycles). I suppose the default is likely to change with 2.0.

Re: Destructor not called for ref object

2020-04-05 Thread Sixte
Honestly I supposed that --gc:arc is the new default gc for Nim 1.2. I'm surprised a bit. So, what is the default gc for Nim 1.2 ?

Re: Destructor not called for ref object

2020-04-05 Thread lscrd
Note that I have been able to get the right result by compiling your example with `--gc:arc`.

Re: Destructor not called for ref object

2020-04-05 Thread juando
Thanks. I will. I didn't know whether it was an issue or me doing something wrong.

Re: Destructor not called for ref object

2020-04-05 Thread Araq
Please report issues on github.

Destructor not called for ref object

2020-04-04 Thread juando
Hi I am new to this language so please bear with me. I was trying to create a simple example with refs and destructors. Here is the code: type MyObj = object of RootObj name: string MyObjRef = ref MyObj proc `=destroy`(obj: var MyObj) = e