Merge pull request #3 from kengonakajima/d3d_optim

Fixing crash (no longer keeping pointer to data in std::vector since any...