Old problem with performance
Christopher Wright
dhasenan at gmail.com
Fri Feb 13 04:21:30 PST 2009
Rainer Deyke wrote:
> Unfortunately this doesn't solve the RAII problem: if
> value_semantics!(T) deletes the contained reference in its destructor,
> then it is no longer safe to embed a value_semantics!(T) variable in
> memory managed by the garbage collector.
You can take additional steps to ensure safety with notifyRegister, if
the type is an object. It's a hole in the language that you can't get
notified about the destruction of anything but an object. Maybe there is
some way to do this via the runtime and the collector rather than the
variable.
More information about the Digitalmars-d
mailing list