USC-NSL / Computational-Agroecology

6 stars 1 forks source link

Make `plant` std::optional #51

Closed ralphchung closed 5 years ago

ralphchung commented 5 years ago

Make plant std::optional instead of a pointer which is defined in struct Cell in environment/terrain.h.

This move avoids the uses of dynamic allocating plant objects, which potentially causes leak.