using GC needs particular skills?

Ellery Newcomer ellery-newcomer at utulsa.edu
Sun Jul 15 20:29:41 PDT 2012


On 07/15/2012 09:01 AM, Alexandr Druzhinin wrote:
> 15.07.2012 22:56, Alexandr Druzhinin пишет:
>> 15.07.2012 22:33, Alex Rønne Petersen пишет:
>> test case:
>>
>> class A {
>> }
>> __gshared A a;
>>
>>   void main(string[] args) {
>>       a = new A;
>> }
>>
>> every time after finishing application I get
>> core.exception.InvalidMemoryOperationError
>> I suspect the problem is misusing __gshared
>
> sorry for my hurry - I've localized the problem in the linked libraries,
> not in my code. Will find further... what the h*ll
> Sorry again
>


I experienced this behavior when I was banging on pyd. Culprit was using 
gc allocated references inside a class destructor, using closures inside 
a class destructor, or asserting or throwing anything inside a class 
destructor.


More information about the Digitalmars-d-learn mailing list