当前位置:网站首页>QT implements the delete method of the container
QT implements the delete method of the container
2022-07-07 11:17:00 【InfoQ】
Summary of premises
- He can store at will , It has unlimited advantages .
- After deleting a certain data in the middle , Subsequent data will be automatically supplemented , No waste .
delete Method 1 of container :
for (std::vector<QCheckBox*>::iterator itvet = m_vetAddCheckBoxControls.begin(); itvet != m_vetAddCheckBoxControls.end(); itvet++)
{
if(*itvet)
{
delete *itvet;
*itvet = nullptr;
}
}
m_vetAddCheckBoxControls.clear();
delete Method 2 of container :
vector<QCheckBox*>().swap(m_vetAddCheckBoxControls);
summary
边栏推荐
猜你喜欢
Unity script generates configurable files and loads
Wallhaven wallpaper desktop version
uniCloud
What if copying is prohibited?
Input type= "password" how to solve the problem of password automatically brought in
RationalDMIS2022阵列工件测量
seata 1.3.0 四種模式解决分布式事務(AT、TCC、SAGA、XA)
基于华为云IOT设计智能称重系统(STM32)
测试优惠券要怎么写测试用例?
Interprocess communication (IPC)
随机推荐
Compile QT project script with qmake
Unity script generates configurable files and loads
测试开发基础,教你做一个完整功能的Web平台之环境准备
VIM命令模式与输入模式切换
對比學習之 Unsupervised Learning of Visual Features by Contrasting Cluster Assignments
Input type= "password" how to solve the problem of password automatically brought in
[untitled]
VR development optimization
Transaction rolled back because it has been marked as rollback only
Verilog realizes nixie tube display driver [with source code]
0.96 inch IIC LCD driver based on stc8g1k08
Static semantic check of clang tidy in cicd
Activity生命周期
Ffmpeg record a video command from RTSP
Vscode 尝试在目标目录创建文件时发生一个错误:拒绝访问【已解决】
Wallhaven壁纸桌面版
Vuthink正确安装过程
Android 面试知识点
Go-Redis 中间件
【时间格式工具函数的封装】