narrowing it down to my misunderstanding of trashing pointers :/