G
Guest
Hi all,
We have a service that polls the Fax Service sent items folder. Recently we
have had reports of the service leaking memory. I have been unable to find
any references to this problem on the web.
The problem was originally noticed in a Delphi application, but reproduces
in managed code too. Some C# to illustrate the problem is below. Varying the
value of the parameter to GetMessages doesn't seem to make a difference, and
explicitly setting the iterator variable to null after the while loop doesn't
seem to help either.
We're running on a fully patched Windows XP Pro SP2.
using FAXCOMEXLib; // requires a reference to c:\windows\system32\fxscomex.dll
class Program {
static void Main(string[] args) {
FaxServer faxServer = new FaxServerClass();
while (true) {
IFaxOutgoingMessageIterator iterator =
faxServer.Folders.OutgoingArchive.GetMessages(100);
try {
iterator.MoveFirst();
while (!iterator.AtEOF) {
IFaxOutgoingMessage message = iterator.Message;
iterator.MoveNext();
}
} catch {
// squish
}
}
}
}
We have a service that polls the Fax Service sent items folder. Recently we
have had reports of the service leaking memory. I have been unable to find
any references to this problem on the web.
The problem was originally noticed in a Delphi application, but reproduces
in managed code too. Some C# to illustrate the problem is below. Varying the
value of the parameter to GetMessages doesn't seem to make a difference, and
explicitly setting the iterator variable to null after the while loop doesn't
seem to help either.
We're running on a fully patched Windows XP Pro SP2.
using FAXCOMEXLib; // requires a reference to c:\windows\system32\fxscomex.dll
class Program {
static void Main(string[] args) {
FaxServer faxServer = new FaxServerClass();
while (true) {
IFaxOutgoingMessageIterator iterator =
faxServer.Folders.OutgoingArchive.GetMessages(100);
try {
iterator.MoveFirst();
while (!iterator.AtEOF) {
IFaxOutgoingMessage message = iterator.Message;
iterator.MoveNext();
}
} catch {
// squish
}
}
}
}