You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The server schema implementation creates memory/resource leaks, since it creates references to it's parent object which are not released, thus the gc will never collect the parent object.
To Reproduce
Delete an object, the destructor will not be ran, and there are multiple references let to the decoder object:
gc.get_referrers(self.decoders.candidateValue[0])
[{'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}]
Expected behavior
Shema should not prevent an object to be destroyed by the gc.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Temporary workaround:
In topDecoderLogic.py:
def delChild(self, child):
child.aboutToDeleteWorkAround() #WORKAROUND CODE FOR ISSUE #123
In decoderLogic.py:
def aboutToDeleteWorkAround(self): #WORKAROUND CODE FOR ISSUE #123
self.parent.decoderMacTopology.removeTopologyMember(self.decoderSystemName.value)
The workaround above only shows the decoder, same workaround have been applied to all MOs.
This workaround fixes the logic, but does not prevent memory/resource leaks when objects using schemas are deleted.
The text was updated successfully, but these errors were encountered:
Describe the bug
The server schema implementation creates memory/resource leaks, since it creates references to it's parent object which are not released, thus the gc will never collect the parent object.
To Reproduce
Delete an object, the destructor will not be ran, and there are multiple references let to the decoder object:
gc.get_referrers(self.decoders.candidateValue[0])
[{'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}, {'dirty': False, 'truelyDirty': False, 'parent': <decoderLogic.decoder object at 0x000001FD3A44AE00>}]
Expected behavior
Shema should not prevent an object to be destroyed by the gc.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Temporary workaround:
In topDecoderLogic.py:
def delChild(self, child):
child.aboutToDeleteWorkAround() #WORKAROUND CODE FOR ISSUE #123
In decoderLogic.py:
def aboutToDeleteWorkAround(self): #WORKAROUND CODE FOR ISSUE #123
self.parent.decoderMacTopology.removeTopologyMember(self.decoderSystemName.value)
The workaround above only shows the decoder, same workaround have been applied to all MOs.
This workaround fixes the logic, but does not prevent memory/resource leaks when objects using schemas are deleted.
The text was updated successfully, but these errors were encountered: