[Geany-Devel] On document pointer recycling

Nick Treleaven nick.treleaven at xxxxx
Sat Oct 26 12:31:16 UTC 2013


On 26/10/2013 13:17, Nick Treleaven wrote:
> * change documents_array to only contain valid documents, i.e. on close
> we swap the last valid document pointer with the pointer being removed,
> and decrement the length by 1.

Actually *move* rather than swap, and set the invalid slot to NULL to 
catch any overshooting index.


More information about the Devel mailing list