I know the basics, but that only the memory leak occurs in the browser is quite strange
Have you tried to generate an executable and launch it from Mac (without a browser) and check if the memory consumption of the process gets out of control at some point?