changing releaseAll to clear bugs
ensuring that element is null
Merge pull request #2730 from joshuajnoble/master

addressing seg errors when clearing