if (ds_exists(this_frame_objects, ds_type_list)) ds_list_destroy(this_frame_objects); if (ds_exists(cachelist, ds_type_list)) ds_list_destroy(cachelist); if (ds_exists(sprite_offsets, ds_type_map)) ds_map_destroy(sprite_offsets); if (ds_exists(sprite_subs, ds_type_map)) ds_map_destroy(sprite_subs); if (ds_exists(castlereflects, ds_type_list)) ds_list_destroy(castlereflects); ds_priority_destroy(render_queue); if (surface_exists(surf)) surface_free(surf); if (surface_exists(precreate_surf)) surface_free(precreate_surf); if (surface_exists(masking_surf)) surface_free(masking_surf);