removePack method
- MLNOfflinePack pack, {
- ObjCBlock<
Void Function(NSError?)> ? withCompletionHandler,
Unregisters the given offline pack and allows resources that are no longer required by any remaining packs to be potentially freed.
As soon as this method is called on a pack, the pack becomes invalid; any
attempt to send it a message will result in an exception being thrown. If an
error occurs and the pack cannot be removed, do not attempt to reuse the pack
object. Instead, if you need continued access to the pack, suspend all packs
and use the MLNOfflineStorage/reloadPacks method to obtain valid pointers to all the packs.
To detect when any call to this method results in a pack being removed, observe
KVO change notifications on the shared offline storage object’s packs key
path. Removals from that array result in an NSKeyValueChangeRemoval change.
When you remove an offline pack, any resources that are required by that pack, but not other packs, become eligible for deletion from offline storage. Because the backing store used for offline storage is also used as a general purpose cache for map resources, such resources may not be immediately removed if the implementation determines that they remain useful for general performance of the map.
@param pack The offline pack to remove. @param completion The completion handler to call once the pack has been removed. This handler is executed asynchronously on the main queue.
Implementation
void removePack(MLNOfflinePack pack, {objc.ObjCBlock<ffi.Void Function(objc.NSError?)>? withCompletionHandler}) {
_objc_msgSend_o762yo(this.ref.pointer, _sel_removePack_withCompletionHandler_, pack.ref.pointer, withCompletionHandler?.ref.pointer ?? ffi.nullptr);
}