SysFreeString is not freeing the variable
<p>Could anyone help me in understanding why the below code is not freeing the memory after it is being allocated.</p>

<pre><code>BSTR ys;
{
    ys = ::SysAllocString(L"Asdfghjk");
    {
        ::SysFreeString(ys);
    }
}
wcout &lt;&lt; ys; // *I could see "Asdfghjk" in console window*
</code></pre>