fixed registry api memory leak (caused by missing ReleaseStringChars)