Still get elements after deletion

Hello, All,
I wonder if anyone can explain to me why this happens. When I delete some walls and then recall all walls in the model to make some changes to them, I get the deleted walls also.
I think it is something related to transactions and I really want to understand it.

Note: I open a transaction in the code to delete and close it before recalling other walls.

Thank You!

@Omar.Elwan ,

Are you sure that you deleted? open/close dynamo ? what happened

Hello @Omar.Elwan …probably you only delete the instance and then you still have the type, if you delete the type is should not be there anymore…ps you cant delete all types…

@sovitek @Draxl_Andreas

Thanks for your replies.

I misunderstood the error. Although it is unclear now, I am sure it is not related to the deletion process. I might create a new topic soon to figure out the reason for my problem and delete this topic.
Sorry for that.

Thank you again for your concern.