Boost logo

Boost Users :

From: scleary_at_[hidden]
Date: 2002-08-22 08:13:31


> -----Original Message-----
> From: wugui [mailto:yg-boost-users_at_[hidden]]
>
> class A;
> class B;
> class AB : virtual public A, virtual public B;
>
> all destruct is virtual
>
> boost::object_pool<AB> pool_ab;
>
> B * pb = pool_ab.constuct();
> pool_ab.destroy(pb); // is this right?

This looks right to me; what "pool_ab.destroy(pb);" does is:
  pb->~AB();
  free(pb); // puts pb back in the free list of pool_ab

        -Steve


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net