This is harder than it looks as soon as you start counting abandoned memory (stuff that's still referenced but not actually used.)
Well if it's still referenced it's still used from my PoV
If it's never read again then it's not used.