Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@wawuwo
Copy link
Collaborator

@wawuwo wawuwo commented Jun 8, 2025

Hi, Vadim!

#1398 is once again caused by improper memory management of labels. I've refactored control of conductor labels to make it less tedious — to avoid explicit deletes, assigning nullptrs, etc. Main character here is the Conductor interface which is not just a plain storage for a pointer anymore, but offers a set of methods for consistent control of labels.

I've tested it a bit. It solves the problem described in #1398. I believe it should be okay overall, but can't guarantee something has not been broken. Anyway, let's give it a try, I'm here to fix in case of any problems.

Fixes: #1398

wawuwo added 5 commits June 8, 2025 11:17
In short:
 - make the field with pointer to label private
 - add functions to control the label (set, release, remove)
 - manage ownership of label automatically via smart pointer

All this should make working with labels easier and consistent.
In short:
 - Make the field with pointer to label's host private
 - Add setter and getter
 - Change label type (Node, VWire, HWire) automatically upon
   assigning the host
@ra3xdh ra3xdh merged commit 9c8289d into ra3xdh:current Jun 10, 2025
8 checks passed
@ra3xdh
Copy link
Owner

ra3xdh commented Jun 10, 2025

I have tested this and didn't find any issues. Merging.

@wawuwo wawuwo deleted the conductor-refactoring branch June 17, 2025 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segmentation fault while editing scheme

2 participants