-
-
Save iwarshak/7951072 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [ UIViewController, UIView, etc. ]... | |
[ UIViewController ].each do |klass| | |
klass.class_eval do | |
def self.allocWithZone(zone) | |
super.tap do |x| | |
p " + alloc! #{x.inspect}" | |
end | |
end | |
alias_method 'old_dealloc', 'dealloc' | |
def dealloc | |
p " - dealloc! #{self.inspect}" | |
old_dealloc | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment