#! /usr/bin/env python
import pygtk; pygtk.require("2.0")

import bonobo
import CORBA, sys
import gc

gc.set_debug(gc.DEBUG_LEAK)

orb = CORBA.ORB_init(sys.argv)
bonobo.activate()


es = bonobo.EventSource()

print "server-side boundary"
es = es.corba_objref() # from now on we work on client-side
gc.collect()
print "client-side"

print ">>unref listener start"
# this should trigger final ref count -> destroy
es.unref()
del es 
print "<<unref listener end"
gc.collect()

