上一页 1 2 3 4 5 6 7 8 ··· 42 下一页

2021年2月25日

Windows API 可能会返回 MSDN 文档上没有提到的错误码

摘要: 例如 _sopen_s 在磁盘空间不够的时候, 宏 errno 就会返回 ENOSPC(28) MSDN 文档时只提到以下错误码 errno valueCondition EACCES The given path is a directory, or the file is read-only, 阅读全文

posted @ 2021-02-25 15:50 liujx2019 阅读(100) 评论(0) 推荐(0) 编辑

FindNextFileA 判断文件夹是否为空,要考虑 . 和 ..

摘要: 使用文件夹地址加上通配符 * 可以搜索文件夹下的文件和文件夹 会搜出两个不是文件的文件 <DIR> . <DIR> .. 所以要至少有三个子文件(夹)才能说这个文件夹不是空的。 阅读全文

posted @ 2021-02-25 09:44 liujx2019 阅读(136) 评论(0) 推荐(0) 编辑

QDir::count 可能消耗过多内存,咋一看像内存泄漏

摘要: 用 QDir::count 获取文件夹的文件数很方便。 但在文件夹里有数百万个文件的时候,执行一次 QDir::count 就可能花费上 GB 的内存。 uint QDir::count() const { const QDirPrivate* d = d_ptr.constData(); d->i 阅读全文

posted @ 2021-02-25 09:25 liujx2019 阅读(199) 评论(0) 推荐(0) 编辑

2021年2月22日

Deleaker Review

摘要: http://winfig.com/deleaker-review/ Posted on June 27, 2020 by Andreas Schmidt In this article I want to provide a review of the Deleaker plugin for Vi 阅读全文

posted @ 2021-02-22 10:57 liujx2019 阅读(39) 评论(0) 推荐(0) 编辑

2021年2月4日

How to detect memory leaks in QtCreator on Windows?

摘要: https://stackoverflow.com/questions/6825376/how-to-detect-memory-leaks-in-qtcreator-on-windows 阅读全文

posted @ 2021-02-04 11:05 liujx2019 阅读(54) 评论(0) 推荐(0) 编辑

Qt 内存泄漏查找工具 Deleaker 要付费的

摘要: https://www.deleaker.com/ 阅读全文

posted @ 2021-02-04 10:33 liujx2019 阅读(443) 评论(0) 推荐(0) 编辑

QStringList 可能占用大量内存

摘要: Qt / QTBUG-47645 https://bugreports.qt.io/browse/QTBUG-47645QStringList has memory leak? void xccxds::on_pushButton_1_clicked() { QStringList list; fo 阅读全文

posted @ 2021-02-04 10:20 liujx2019 阅读(730) 评论(0) 推荐(0) 编辑

Using select() for non-blocking sockets

摘要: 原问题 I am trying to use the select function to have non-blocking i/o between a server and 1 client (no more) where the communication flows nicely (can 阅读全文

posted @ 2021-02-04 10:16 liujx2019 阅读(106) 评论(0) 推荐(0) 编辑

2021年2月2日

使用 Critical Section 加锁的一个例子

摘要: 此处是用 Critical Section lock 来保护 data.handling EnterCriticalSection(&lock); if (data.handling) { tick64_t start = get_tick64(); do { SleepConditionVaria 阅读全文

posted @ 2021-02-02 16:32 liujx2019 阅读(185) 评论(0) 推荐(0) 编辑

Critical Section

摘要: First up is the critical section object. This lock is used heavily by countless applications but has a sordid history. When I first started using crit 阅读全文

posted @ 2021-02-02 16:20 liujx2019 阅读(173) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 42 下一页

导航