SOLVED ds_list_destroy

Neptune

Member
If I code
GML:
var my_list = ds_list_create(); // now some index (8?)
ds_list_destroy(my_list);

if ds_exists(my_list,ds_type_list) {ds_list_destroy(my_list);}
Did I just destroy some random list index on the second destroy, because the variable my_list was now possibly referencing a different list somewhere?
 

TsukaYuriko

☄️
Forum Staff
Moderator
If you created another list in between, yes. No chance of this happening if you set my_list to -1 after destroying it.
 
Top