On Tuesday 04 November 2008 01:18:47 Alan Baljeu wrote: > void baz(foo &x); > > If I have a foo, I call baz with it, foo's contents may change but it's > still the same object. I don't see an issue here, unless foo is a smart > pointer type.
Sometimes, baz might store the reference (admittedly, that's not very good design, except for some register_xxx functions, but I'd use pointers then anyway), and when the foo is destroyed, you have a dangling reference. In boost::python, this can be prevented, by binding the lifetime of foo to some other objects (where baz stores the reference). Greetings, Hans _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig