#
package require Itcl
namespace import itcl::*

class base {
  public method printHeritage {}
}

class derrived {
  inherit base
}

body base::printHeritage {} {
  for {set i 1} { $i < 10000000 } { incr i} {
      puts "$i [uplevel [info heritage]]"
      #puts "$i [info heritage]"
  }
}

class derrrived {
  inherit derrived
  public method checkMemLeak {}
}


body derrrived::checkMemLeak {} {
  base inst
  inst printHeritage
}

derrrived inst
inst checkMemLeak
