Article View: microsoft.public.vb.bugs
Article #4memory leak using VBA6 and file access
From: Martin E. Muehlmann
Date: Wed, 29 Aug 2001 05:01
Date: Wed, 29 Aug 2001 05:01
35 lines
2877 bytes
2877 bytes
Hi!
I have a VBA 6 application (hosted in Excel, Win 2000 prof + SP 2 and SP5
for VStudio 6) and for some reasons I have a communication using files
between this app and a C program (that is a shelled process of my VBA app).
I know that this isn't the most elegant method of exchanging data but that's
how it is and I want to ask YOU before I redesign it from scratch.
loop 20000 times:
1. VBA app writes textfile w/ data. (sequential mode)
2. C program reads it and processes data
3. C program writes output textfile
4. VBA app read output file (sequential and binary mode)
next
The problem is that I call this C program tousends of times and after each
iteration I have less free resources and after a couple of hours the system
crashes and I can't even open a textfile. The curious thing is that the
task manager tells me that the Excel process allocates only about 25kBytes
(and this doesn't change while my app is running...)
I'm quite sure that it is not the C program itself which causes the crash,
but the type of communication I've chosen. I even recoded the file access
from sequential mode to binary mode (only for reading the data not for
writing them though).
Has anybody experienced similar problems and do you have a solution for
that?
Thank you for reading my posting,
Martin
PS: Ich versteh auch Deutsch und ich hoff du verstehst mein Englisch *g*.
martin@ece.mcgill.ca
Technical Details
Message-ID:
<yG_i7.26585$KE4.3528529@carnaval.risq.qc.ca>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!sunqbc.risq.qc.ca!carnaval.risq.qc.ca.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fde1d,83d952307302d24d,start X-Google-Attributes: gidfde1d,public X-Google-Thread: 10229f,83d952307302d24d,start X-Google-Attributes: gid10229f,public X-Google-Thread: fc5c4,83d952307302d24d,start X-Google-Attributes: gidfc5c4,public X-Google-Thread: f7a67,83d952307302d24d,start X-Google-Attributes: gidf7a67,public X-Google-Thread: fcf3e,83d952307302d24d,start X-Google-Attributes: gidfcf3e,public X-Google-ArrivalTime: 2001-08-28 22:01:41 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!sunqbc.risq.qc.ca!carnaval.risq.qc.ca.POSTED!not-for-mail From: "Martin E. Muehlmann" <martin@ece.mcgill.ca> Newsgroups: microsoft.public.vb.bugs,basicworld.public.vb.allgemein,microsoft.public.de.vb,microsoft.public.office.developer.vba,microsoft.public.vb.bugs,microsoft.public.word.vba.general Subject: memory leak using VBA6 and file access Lines: 37 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <yG_i7.26585$KE4.3528529@carnaval.risq.qc.ca> Date: Wed, 29 Aug 2001 05:01:18 GMT NNTP-Posting-Host: 132.206.42.60 X-Complaints-To: abuse@mcgill.ca X-Trace: carnaval.risq.qc.ca 999061278 132.206.42.60 (Wed, 29 Aug 2001 01:01:18 EDT) NNTP-Posting-Date: Wed, 29 Aug 2001 01:01:18 EDT