Noticed a fact that when the mouse goes over and out of a drawn shape or over an item from the tree list the reported number of GDI objects increases with about 300 objects at every mouse over. When it reaches 10000 GDI objects the application crashes. This is a reason for some of the Extrude crashes but it is not related with the extrusion algorithm.
Verified the PropertyGrid for leaking, the TreeView and also the NamedShapeInterpreter.RegenerateShape(). Couldn't find the problem. In order to solve it, improved the descriptors that display the objects in the grid so they are reused instead of being created at each display.
To test the shape creation for leaking decided to make nUnit test codes for it: implemented a test framework that prepares the environment for testing OpenCascade objects, implemented a test that creates a shape, displays it and removes it 1000 times and it wasn't generating GDI object creation leaks, implemented another test that creates a rectangle in a Node from the data tree then displays the shape generated and selects/unselects it 1000 times, this also is not generating any GDI leaks.
Will continue investigating this problem improving and fixing the code while investigating.