Commit d5e89e0
committed
fix: set parent for NetItem to prevent JS release
1. Added setParent() calls for root and delete items in
NetManagerPrivate constructor
2. Added setParent() call when adding child items in
NetItemPrivate::addChild()
3. These changes ensure proper parent-child relationships are
established
4. Prevents potential issues where JavaScript could release NetItem
objects prematurely
Influence:
1. Test network item hierarchy remains stable during operations
2. Verify parent-child relationships are correctly maintained
3. Test JavaScript interactions with network items
4. Ensure no memory leaks or premature object destruction
5. Verify network view operations work correctly after these changes
fix: 为NetItem设置父对象防止JS释放
1. 在NetManagerPrivate构造函数中为根项目和删除项目添加setParent()调用
2. 在NetItemPrivate::addChild()中添加子项目时调用setParent()
3. 这些更改确保建立正确的父子关系
4. 防止JavaScript可能提前释放NetItem对象的问题
Influence:
1. 测试网络项目层次结构在操作期间保持稳定
2. 验证父子关系是否正确维护
3. 测试JavaScript与网络项目的交互
4. 确保没有内存泄漏或对象过早销毁
5. 验证网络视图操作在这些更改后正常工作1 parent 3af62ca commit d5e89e0
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
210 | 212 | | |
211 | 213 | | |
212 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| 125 | + | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| |||
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
| 142 | + | |
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
| |||
0 commit comments