0

I've been working on an issue for a days now. Our C# Application uses IBM MQ client to connect to a MQManager and place message to its Queue. However our application logs shows the following:

<InnerException>
    <InnerType>System.NullReferenceException</InnerType>
    <InnerMessage>Object reference not set to an instance of an object.</InnerMessage>
        <InnerStackTrace>
           at IBM.WMQ.MQQueueManager.Dispose(Boolean disposing)
   at IBM.WMQ.MQQueueManager.Finalize()
        </InnerStackTrace>

I have done some research on overriding Finalize() method. It seems overriding it may cause GC to take 2 cycles which will result to a waste of memory that can be cleaned. Also more CPU will be consumed. Will there be an instance that an object will not be properly GC'ied? due to some external factors like High CPU Usage?

JoshMc
  • 8,846
  • 2
  • 15
  • 34
user3065339
  • 107
  • 8
  • When does the error occur? While closing connection by calling Disconnect method or when the queue manager object gets disposed due to it going out of scope? – Shashi Nov 10 '16 at 04:38
  • I don't think this question should be made duplicate. The exception is not being thrown from his/her code. It's coming from an assembly he/she is using. Happy if someone could make this a "NOT" duplicate. – Shashi Nov 10 '16 at 05:01

0 Answers0