He's not doing anything wrong. The OS doesn't call dealloc for all objects when your application is terminated. You are even supposed to call a function telling the OS that your app can be killed anytime without warning (for example when the user shuts down their machine) if you don't need to save any state.
Thanks to gnasher729 for jumping in, but to hammer this home:
"You should not tie management of system resources to object lifetimes ... When an application terminates objects may not be sent a dealloc message"
from
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.pdf, page 16.
As for doing something wrong, I'm really not "doing" to much personally, I just try to help. The dealloc issue has come up a number of times, and has been a point of confusion, so I thought I'd mention it.
As for your specific issue, I've read your second post a few times, but I'm not 100% sure I grok what's going on. Is the case that your "resource handler" is acting as a proxy to a scarce resource, but it does not control all access to the resource, it just hands out a reference to it? And where you're running into trouble is determining when the resource is no longer in use, so it can be disposed of (from the "proxy"), requiring it be recreated if access is requested? In other words, there will be times in your application's lifecycle when this resource is not needed, and you'd like to be able to dispose of it during these times to free up some memory?
-Lee
Edit: after reading your most recent post, I think I have a better idea of what you're up to. If you're comfortable using dealloc for this, my approach would be:
In your big, cached object add an instance variable that points to the controller/cacher.
In your resource controller, when you allocate your cached object, pass in a reference to the controller itself. If you don't have one already, add a "hasValidAwesomeObject" instance variable that is set to true when you create your awesome object, and a method to set this to false.
In your awesome object's dealloc, call the controller's "set to false" method.
In your controller, you will always check your hasValidAwesomeObject member before handing out a reference. If it's false, instantiate an awesome object, set hasValidAwesomeObject to true, and return the reference to the new awesome object.
Edit 2: maybe this is already your approach mentioned in your second post, and you're just looking for something cleaner/more automagical. If so, I can't think of one.