A Refcounted Array Type
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Wed Mar 4 07:39:44 PST 2015
On 3/4/15 2:26 AM, Kagamin wrote:
> On Tuesday, 3 March 2015 at 18:38:11 UTC, Steven Schveighoffer wrote:
>> int *myglobal;
>>
>> repeat same code, but access what myglobal points to instead of
>> setting to 42. Memory corruption is what @safe code is trying to
>> prevent. This would lead to memory corruption.
>
> You mean, the class destructor accesses a GC-allocated memory? That's
> indeed unsafe, but unrelated to globals.
Wow, you really aren't getting it. I give up, it's tiring.
-Steve
More information about the Digitalmars-d
mailing list