RobotLocomotion/drake — pull request #268 by RussTedrake (2014-08-08 02:31:13+00:00)
Title: Resolves at least one BIG memory bug.  hoorah

I finally figured out that the problem was that constructModelmex was being cleared, therefore destroying the memory allocated with it, before the delete function was being called (at least on some platforms). added mexLock and mexUnlock logic to protect against this.

i've updated drakeMexPointer, and IKoptions, but not RigidBodyConstraints (which reimplemented their own mex pointer classes!!)