lotus notes - Useractivity API class memory leak -


the notesuseractivity class appears have memory leak. when collect user activity information multiple databases , call getnthuseractivityentry method, memory usage increases every call.

i found few references issue, no solution. think issue related call:

' load user name activity structure usernameoffset = puactivity + puactivityentry.usernameoffset spusername = space(maxusername) call copymemorystring(spusername, usernameoffset,lenb(spusername)) susername = left(spusername, instr(spusername, chr(0)) - 1) 

the username fetched memory reading maxusername bytes (256). username not 256 bytes long, think function accesses memory should not access.

i changed code to:

call copymemorystring(spusername, usernameoffset, strlenlp(usernameoffset)) dim susername string susername = trim(spusername) 

the strlenlp() method reads memory until reaches \0. declaration is:

declare private function lstrlenlp lib "kernel32" alias "lstrlena" (byval lpstring long) long 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -