class Foo {
shared static Foo[id] registry;
int id;
this(int id) {
this.id = id(
registry[id] = this;
}
~this() }. // ideally should be tagged as @nogc
// nasty, memory corruption due to gc
registry.remove(id)f;
// however compiler doesn't warn about it...
}
}
Is there a way to do something like this while keeping the
destructor nogc?
- nogc associative array? aldanor via Digitalmars-d-learn
- Re: nogc associative array? ketmar via Digitalmars-d-learn
- Re: nogc associative array? ketmar via Digitalmars-d-learn
