Home > Software engineering >  Add after deleting duilib load large quantum control will collapse!
Add after deleting duilib load large quantum control will collapse!

Time:11-25

Written using duilib library interface, listUI loading amount of child controls, delete all add such operations after many times, project collapse,
I don't know what the reason is? Is it a list control RemoveAll didn't delete clean lead to add fail?

CodePudding user response:

Collapsed in the pop-up dialog box, press the corresponding button to enter debugging press Alt + 7 key to view the Call Stack, namely "the Call Stack" from the inside to the following out of from the inner to outer function Call history, double-click a row to the cursor to the Call of the source code or assembly instruction, double-click on the next line when don't understand, until can understand,

CodePudding user response:

This may be a third party libraries bugs, it is best to avoid

CodePudding user response:

As said earlier, to track it, if have memory leaks, ruled out after, to determine whether the lib bugs,

CodePudding user response:

Duilib, bug list controls, be is the wm_mousemove message before the conflict, the need to empty m_PaintManager load information, such as:
Void CDuiMainWnd: : ClearPaintManagerLog ()
{
Int count=m_pList - & gt; GetCount ();
If (count & lt;=0)
{
return;
}
for (int i=0; I & lt; The count. + + I)
{
M_PaintManager. RemoveMouseLeaveNeeded (m_pList - & gt; GetItemAt (I));
}
}

CodePudding user response:

M_pList - & gt; SetDelayedDestroy (false);
M_pList - & gt; RemoveAll ();
This is the simplest, didn't read the source code before

CodePudding user response:

reference 5 floor lijia626482312 reply:
m_pList - & gt; SetDelayedDestroy (false);
M_pList - & gt; RemoveAll ();
This is the simplest, didn't read the source code before


Use the m_pList - & gt; SetDelayedDestroy (false); Later, there will be other anomalies

CodePudding user response:

Bool ViewForm: : RemoveClass1 (UI: : EventArgs * MSG)
{
STD: : wstring name=MSG - & gt; PSender - & gt; GetName ();
This - & gt; Btn_stop1_;
This - & gt; Phone1_;
}

Why do wrong??
  • Related