Separate dynamic object arrays for multiple instances of overlying object

Basile B. b2.temp at gmx.com
Thu Mar 14 12:00:37 UTC 2024


On Thursday, 14 March 2024 at 10:21:41 UTC, Jonathan wrote:
> The following seems the be the minimum required for this 
> problem to pop up.  I've changed the names to what I'm using in 
> my code to make it more clear for me.
>
> [...]

Classic. Instead of a static initializer rather uses a 
constructor for instances.

```d
class Spectrum
{
     PrecursorList precursorList;
     this()
     {
         precursorList = new PrecursorList();
     }
}
```


More information about the Digitalmars-d mailing list