Comment

Comment by nknighthb

You seem to be describing behavior that the article did not. Specifically, the retention of 'str' because of the 'logIt' function.

If you read more closely, you'll notice that logIt was not the cause of 'str's retention, but instead, the doSomethingWithStr function was.

When logIt is present by itself, str is not retained. Only when doSomethingWithStr is added alongside logIt is str retained.

parent nknighthb 13 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton