Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Resource leak problem
Message
De
14/08/1998 03:44:01
Eitan Lubitch
Ludan Engineering Co. Ltd.
Tel Aviv, Israél
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Resource leak problem
Divers
Thread ID:
00126812
Message ID:
00126812
Vues:
65
Hi all,

I created, using VC++ 5, an in-process automation server to improve a VFP application. The server is devellopped using ATL and is a straight COM automation server (no OCX). One particularity of my DLL is than it uses the pro_ext.h and OCXAPI.LIB to make calls to _Execute and _Evaluate functions.
1. My first question is that in VFP standalone runtimes, the _Execute and _Evaluate functions are not functioning. But they work OK if I run my application from VFP.EXE. I could olny solve this problem by loading the COM DLL as a FLL, with SET LIBRARY TO... But now VFP crashes when I'm exiting. The crash is a access violation due to a access to the heap in the CComModule.Term() method. I have reasons to belive that this is happening because the module is released twice, once as a FLL and once as a COM server! Looks strange to me that I have to load the COM server as a FLL, but is the only way that LCK functions are funtioning in standalone EXEs. Does anyone know a solution to that, eithern to prevent the SET LIBRARY TO, either to prevent the access violation?
2. Another problem is less related to VFP, but my COM server is eating system resources, crashing Windows 95 in a few minutes. I checked the memory leaks reported by the Debug Dump at the end of program execution, but, altough they exist, they're not related to the system resources allocation. My program is allocating and releasing lot of BSTR objects, using the _bstr_t class. I think this is the cause of problem. I don't have a program like Bounds Checker to help me and I must eliminate the problem in the next few days! Can anyone help me, either reporting me some known problems with _bstr_t and _variant_t classes, either by some advices how to track the system resource allocations?

Best regards,
Eitan Lubitch

I'm using VFP 5 and VC++5, both with Visual Studio service pack 3 installed. I'm runing in Windows 95 and Windows 95b (OSR2). The resource leak is not visible in NT, but I think this is only because of the 64k system resource limit under Windows 95.
Répondre
Fil
Voir

Click here to load this message in the networking platform