1

Resolved

XamObject.Dispose method not implemented correctly.

description

the XamObject.Dispose method contains the following code:
 
        if (!disposed)
        {
            // Cleanup any unmanaged objects
 
            disposed = true;
            Close();
        }
 
The XSet.Close and XStream.Close methods contain similar to the following code:
 
protected override void Close()
    {
        lock (<objects>)
        {
            if (!disposed)
            {
                int retval = Imports.<XItem>_Close(handle);
 
The code within the if (!disposed) block will never be executed.
 
I believe this is responsible for continual memory usage when creating and committing a lot of items.
 
Using the following setting on the XSystem for testing purposes,
 
_xsys.SetField("com.emc.centera.buffersize", 10 * 1024 * 1024)
 
memory usage grew at a dramatic rate, and never dropped.
 
with the XamObject.Dispose method changed to the following,
 
        if (!disposed)
        {
            // Cleanup any unmanaged objects
 
            Close();
            disposed = true;
        }
 
memory usage stays stable.

comments