Skip to content

Instantly share code, notes, and snippets.

@Groogy
Created December 23, 2019 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Groogy/5084a81ad42806ef5f2cf39d02d88e88 to your computer and use it in GitHub Desktop.
Save Groogy/5084a81ad42806ef5f2cf39d02d88e88 to your computer and use it in GitHub Desktop.
abstract class Trashman::BaseRecord
abstract def callstack : CallStack
abstract def allocations : Uint64
abstract def deallocations : Uint64
abstract def untrack : Void
abstract def type_str : String
end
module Trashman::Statistics
@@records = [] of BaseRecord
# ... Snip
def self.on_finalize(ref)
@@records.each do |record|
record.untrack
end
end
# ... Snip
end
# Error: undefined method 'Trashman::BaseRecord#untrack()'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment