Crutch
Well-known member
So I want an INIT to use the Notification Manager to alert the user (once the Finder loads) if it couldn’t run. That’s easy. To do it, though, I have to give _NMInstall an NMRec that includes a pointer to the string I want to display in the alert, which I have to stick in a nonrelocatable block in the System Heap so it doesn’t get wiped before the Finder loads.
So: does anyone know of a way to do this without permanently wasting at least a tiny bit of memory?
It seems I have two choices:
@cheesestraws you might know
So: does anyone know of a way to do this without permanently wasting at least a tiny bit of memory?
It seems I have two choices:
- Call _NMInstall with a nmResp value of -1. Then the Notification Manager automatically removes my NM queue element after displaying the alert — however, that nonrelocatable block holding the string I displayed will never be recovered.
- Write a response procedure and install it in a nonrelocatable block in the System Heap. My response procedure can call _DisposPtr on my string… however, it can’t dispose of itself while it is running. So, now the memory used for the response procedure code will never be recovered.
@cheesestraws you might know