Tomek got it right. Fixed by copying the objects, rather than using pointers. Thanks!
- Re: What's wrong with this code? Michal Minich
- Re: What's wrong with this code? Steven Schveighoffer
- Re: What's wrong with this code? Tomek SowiĆski
- Re: What's wrong with this code? (OP) Sean Eskapp
- Re: What's wrong with this code? bearophile
- Re: What's wrong with this code? Michal Minich
- Re: What's wrong with this code? bearophile
- Re: What's wrong with this code? Dmitry Olshansky
- Re: What's wrong with this code... bearophile