Generally, it is either
// Object to void *:
contextInfo:(__bridge void *)s
// void * to object:
NSString *s = (__bridge NSString *)context;
or
// Object to void *, retaining the object:
contextInfo:(__bridge_retained void *)s
// void * to object, transferring ownership.
// The object is released when s goes out of scope:
NSString *s = (__bridge_transfer NSString *)context;
In the first case, there is no transfer of ownership, therefore the main program must hold a strong reference to the object as long as the sheet is active.
In the second case, the object is retained when creating the sheet, and released
in the sheetDidEnd:
method. It is not required that the main program holds
a strong reference, so this is the safe method.