Mercurial > projects > qtd
comparison qt/QGlobal.d @ 260:b5773ccab07d lifetime
closer
author | maxter |
---|---|
date | Fri, 18 Sep 2009 18:52:03 +0000 |
parents | 17b5e13364b7 |
children |
comparison
equal
deleted
inserted
replaced
259:515d6e1c7b10 | 260:b5773ccab07d |
---|---|
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 version (D_Version2) | 55 version (D_Version2) |
56 { | 56 { |
57 void StackAlloc __stackAlloc() | 57 StackAlloc __stackAlloc() |
58 { | 58 { |
59 static StackAlloc instance; // thread-local instance | 59 static StackAlloc instance; // thread-local instance |
60 // COMPILER BUG: No thread-local static constructors, Using lazy construction | 60 // COMPILER BUG: No thread-local static constructors, Using lazy construction |
61 if (!instance) | 61 if (!instance) |
62 instance = new This(stackSize); | 62 instance = new This(stackSize); |
75 static StackAlloc __stackAlloc() | 75 static StackAlloc __stackAlloc() |
76 { | 76 { |
77 auto res = stackAllocInst.val; | 77 auto res = stackAllocInst.val; |
78 if (!res) | 78 if (!res) |
79 { | 79 { |
80 res = new This(stackSize); | 80 res = new StackAlloc(stackSize); |
81 stackAllocInst.val = res; | 81 stackAllocInst.val = res; |
82 } | 82 } |
83 return res; | 83 return res; |
84 } | 84 } |
85 } | 85 } |