The array is not destroyed when the Slapi_Mods is destroyed. Notice that you cannot insert new mods in a Slapi_Mods that has been initialized by reference.