Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boost::shared_ptr<PointPrism> getPrismFromDirection(const Point3& direction) const
- {
- return boost::shared_ptr<PointPrism>(new PointPrism(_position, direction));
- }
- boost::shared_ptr<PointPrism> getPrismFromAimingPoint(const Point3& aimingPoint)
- {
- boost::shared_ptr<PointPrism> prism = getPrismFromDirection((aimingPoint - _position).normalized());
- prism->setAimingPoint(aimingPoint);
- return prism;
- }
- main()
- {
- boost::shared_ptr<Point> p; //initialized somewhere in this code
- boost::shared_ptr<PointPrism> prism = p->getPrismFromAimingPoint(aimingPoint);
- //here it looks like the prism object is just fine
- boost::this_thread::sleep(boost::posix_time::seconds(10));
- //here both VS10 debugger and log prints show that values inside prism are corrupted
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement