using GC needs particular skills?

Alex Rønne Petersen alex at lycus.org
Sun Jul 15 09:04:01 PDT 2012


On 15-07-2012 17:56, Alexandr Druzhinin wrote:
> class A {
> }
> __gshared A a;
>
>   void main(string[] args) {
>       a = new A;
> }

Seems to work for me? (This use of __gshared is perfectly fine, btw.)

alexrp at alexrp ~/Projects/tests $ cat test.d
class A {
}
__gshared A a;

  void main(string[] args) {
      a = new A;
}
alexrp at alexrp ~/Projects/tests $ rdmd test.d
alexrp at alexrp ~/Projects/tests $

-- 
Alex Rønne Petersen
alex at lycus.org
http://lycus.org




More information about the Digitalmars-d-learn mailing list