-
Notifications
You must be signed in to change notification settings - Fork 77
Description
It should now be possible to make a tree sequence based on a "borrowed" or "stolen" reference to a table_collection_t
. For a borrowed reference, we store a pointer to the supplied tables, and do not free these tables when the tree sequence object is destroyed. For a stolen reference, we store a pointer to the supplied table collection which we free when the tree sequence object is destroyed. These can be specified with (mutually exclusive) flags. The default behaviour should be the present case, where we take a copy of the argument table_collection_t.
This behaviour will be useful for simulations, where we really don't need to have two copies of the same tables. However, we'll need to be careful to ensure that the underlying tables don't get modified. Possibly need to add some locks to the tables to ensure this.
See also tree_sequence_load
for current wasteful behaviour.