From snowyfox at 163.com  Mon Feb  9 04:56:27 2015
From: snowyfox at 163.com (=?GBK?B?xLrI59Gp?=)
Date: Mon, 9 Feb 2015 11:56:27 +0800 (CST)
Subject: [Rd] How to unload R.dll successfully by FreeLibrary
Message-ID: <7e8dc1d7.561b.14b6c7b31bb.Coremail.snowyfox@163.com>

hi,
   I write some code to check the R.dll reference count, and find after LoadLibrary, the R.dll reference count is 3 instead of 1, and after call pfnInit, the reference count is 19, means the R.dll got loaded many times after call pfnInit, even after call  LoadLibrary, I assume the reference count should be 1, Now I wonder how to decrease the reference count increased by pfnInit, seems pfnEnd does NOT decrease the reference count to 3. I find easy time I call FreeLibrary, the reference count decrease by 3 each time, so I guess if there is a way to decrease the the count by 16(which is increased by pfnInit), I can unload the R.dll successfully by FreeLibrary.


So anyone will be kind to point me to the right direction, thanks.



????????????????????????????









	[[alternative HTML version deleted]]



[Rd] How to unload R.dll successfully by FreeLibrary
=?GBK?B?xLrI59Gp?=