>>535-536
メモリリークしないのは shared_ptr
ためしに、>>536 の main を以下のように書き換えて見れ。

int main()
{
 boost::shared_ptr< void > p( new EX );
 return 0;
}