llprogrammer
Programmer
Hi All,
I work on Livelink project and can't find the source of memory leaks in it. The project is COM dll that send documents to Livelink server, so there's method StoreDoc():
DocSender::StoreDoc()
{
LL_Initialize( LL_HEADER_VERSION );
...
LL_SessionAllocEx( &session, server, port, "", login, password, NULL);
...
/* Here we do some work and store document into LL server*/
if (session != NULL){
LL_SessionFree( session );
}
LL_Uninitialize();
}
In order to eliminate inessential details I had write this simple program:
LLSTATUS f(){
LL_Initialize( LL_HEADER_VERSION );
LL_SessionAllocEx( &session, server, port, "", login, password, NULL);
if (session != NULL){
LL_SessionFree( session );
}
LL_Uninitialize();
}
void g(){
for(int i=0;i<=1000; i++){
f();
}
int main(){
g();
}
and run it. During execution quantity of memory have risen
from 3Mb to 20Mb!
Any ideas would be greatly appreciated!
Thanks in advance,
Alexey.
I work on Livelink project and can't find the source of memory leaks in it. The project is COM dll that send documents to Livelink server, so there's method StoreDoc():
DocSender::StoreDoc()
{
LL_Initialize( LL_HEADER_VERSION );
...
LL_SessionAllocEx( &session, server, port, "", login, password, NULL);
...
/* Here we do some work and store document into LL server*/
if (session != NULL){
LL_SessionFree( session );
}
LL_Uninitialize();
}
In order to eliminate inessential details I had write this simple program:
LLSTATUS f(){
LL_Initialize( LL_HEADER_VERSION );
LL_SessionAllocEx( &session, server, port, "", login, password, NULL);
if (session != NULL){
LL_SessionFree( session );
}
LL_Uninitialize();
}
void g(){
for(int i=0;i<=1000; i++){
f();
}
int main(){
g();
}
and run it. During execution quantity of memory have risen
from 3Mb to 20Mb!
Any ideas would be greatly appreciated!
Thanks in advance,
Alexey.