On Thu, Jun 06, 2024 at 05:49:39PM +0000, Andy Valencia via Digitalmars-d-learn 
wrote:
> I was using instance initialization which allocated a new object.  My
> intention was this initialization would happen per-instance, but all
> instances appear to share the same sub-object?  That is, f1.b and f2.b
> appear to point to a single object?
[...]

Yes, if you want a per-instance object, you need to do it in this(), not
in the initializer.


--T

Reply via email to