Merge pull request #2851 from dumganhar/master

issue #2271: Fixing some memory leaks. [VS2012] Updating project dependence and warning fixes.
Updating JS-Test.