The NSDraggingItem class encompasses a single dragged item within an NSDraggingSession instance.
The NSDraggingItem class encompasses a single dragged item within an NSDraggingSession instance.
See NSDraggingSession Class Reference for more information
NSDraggingItem objects have extremely limited lifetimes. Do not retain these items as changing outside of the prescribed lifetimes have no impact on the drag.
When the NSDraggingSession method beginDraggingSessionWithItems:event:source: is called, the dragging items passed to the method are consumed immediately and are not retained. Any further changes to the dragging item associated with the returned NSDraggingSession must be done via the enumeration method enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:. When enumerating, NSDraggingItem instances are created right before being given to the enumeration Block. After returning from the Block, the NSDraggingItem instance is no longer valid.