added functions for reference counting of TCL objects