update LRUCache destructor so it does NOT look like a bad reference Unre... #38

merged 1 commit into from Aug 2, 2012


None yet

4 participants




From a purely code review perspective, I'll +1 this change, but I can't run it to verify it does something better.

However, I was briefly thrown by "++e->refs;", which I would rather see written as "e->refs++;" so that innocent bystanders don't wonder why you're dereferencing some incremented pointer, e, and not doing anything with it. Especially since the comment talks about a hack to keep an object alive. I know the pre-increment semantics say it operates on the result of the pointer, but it was confusing at first. Just my $.02.

@buddhisthead buddhisthead merged commit 2aebdd9 into master Aug 2, 2012
@matthewvon matthewvon deleted the mv-cache-corruption branch May 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment