Separate dynamic object arrays for multiple instances of overlying object
Jonathan
daemon512 at gmail.com
Thu Mar 14 13:15:26 UTC 2024
On Thursday, 14 March 2024 at 12:00:37 UTC, Basile B. wrote:
> 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();
> }
> }
> ```
This seems to have solved the problem. This thought had crossed
my mind at one point, then left before I could implement it.
Really appreciate the help!
More information about the Digitalmars-d
mailing list