memory leak from IBM's .NET for websphere-- amqmdnet.dll

K

Ken

Good morning everyone,

I am having a problem closing/disposing of objects created
by using IBM's "amqmdnet.dll" . This dll was written
for .NET by Neil Kolban & IBM. My problem is when I click
the button it creates a IBM.WMQ.PCF.PCFMessageAgent class
object. However ,IBM has not followed best practice so
there is no dispose() to release the memory. Setting the
agent = null; does nothing and when I stop running the
app, I receive a system error box which says:
An unhandled exception of
type 'System.NullReferenceException' occured in
amqmdnet.dll. Additional information:Object Reference not
set to an instance of an object. I am hoping someone has
used this dll and can tell me how to release the object in
code.
Thank You in advance for Your Help,
Ken
P.S. below is the


private void button1_Click(object sender, System.EventArgs
e)
{ string queueManagerName
= "W0445D27";
string[] ProcessNames = new string
[]{""};
try
{

IBM.WMQ.PCF.PCFMessageAgent agent1 = new
IBM.WMQ.PCF.PCFMessageAgent(queueManagerName);
agent1 = null;
}
catch( NullReferenceException ne )
{
Console.WriteLine( "Caught
error: {0}.", ne);
}
catch(IBM.WMQ.MQException eq)
{
Console.WriteLine
("Exception: " + eq.ToString());
}
catch(Exception ex)
{
Console.WriteLine
("Exception: " + ex.ToString());
}
}
 
H

Herfried K. Wagner [MVP]

* "Ken said:
I am having a problem closing/disposing of objects created
by using IBM's "amqmdnet.dll" . This dll was written
for .NET by Neil Kolban & IBM. My problem is when I click

Don't they provide support for this DLL?
 
K

Ken

Hello Herfried K. Wagner,

The answer is NO.They do not support it. IBM and Microsoft
are at WAR with each other and only make small levels of
peace. Nei Kolban wrote most of the dll himself then IBM
decided that they wanted to own his code. Now this dll has
a level 2 support which means they own it , but do not
support it. That said, if anyone has any experience using
unmanaged code , please help me to understand how to
control this beast!!

Thank You in advance for Your Help,
Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top