You can expand and modify as you please...
So I modified this excellent example with a few changes to use Corba interfaces (which I usually prefer). The programmer then has complete control over when and if constructs are freed, rather than relying on compiler-generated reference-counting code which does this behind your back at unknown moments.
Attached is an alternative implementation in case it is useful.