久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

QObject 到底有多重?

How heavy is QObject really?(QObject 到底有多重?)
本文介紹了QObject 到底有多重?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我最近發布了一個關于 QObject 在典型使用場景中的開銷的問題,但不幸的是,該問題與另一個在技術上沒有回答問題的問題重復.

I recently posted a question about the overhead of QObject in typical usage scenarios, but unfortunately the question got closed as a duplicate of another question that didn't technically answer the question.

更糟糕的是,禮貌地沖過去結束我的問題的倉促的撒瑪利亞人"打斷了我在運行了幾次測試后剛剛完成打字的答案.由于我無法再在原始問題中發布我的發現,我將其發布在這里,以便其他可能需要該信息的人可以使用.

What is worse, the hasty "Samaritans" who politely rushed to close my question interrupted the answer I was just finishing typing after running a few tests. Since I can no longer post my findings in my original question, I'll post it here so it is available to others who might need that information.

推薦答案

很多人都暗示 QObject 很重,但并不清楚它到底有多重.所以我做了一些測量,不是很準確,所有數值都是近似值.

A lot of people have hinted at QObject being heavy, but without any clarity on how heavy is it exactly. So I did some measurements, not very accurate, all values are approximate.

  • 未使用的 QObject ~160 字節
  • 沒有參數的單個自動連接 ~235 字節
  • 2 個不帶參數的自動連接 ~315 字節
  • 3 個自動連接,1 個帶有 3 個參數 ~400 字節
  • 2 個自動連接,1 個排隊,有 3 個參數 ~432 字節

這些數字應該考慮到我使用的是 64 位 Qt 版本.

Those numbers should take into account I am using a 64 bit Qt build.

所以,總而言之,QObject 的開銷確實相當大.沒有什么可以打噴嚏或過度使用.

So, in conclusion, the overhead of QObject is quite significant indeed. Nothing to sneeze at or overuse.

這篇關于QObject 到底有多重?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How can I read and manipulate CSV file data in C++?(如何在 C++ 中讀取和操作 CSV 文件數據?)
In C++ why can#39;t I write a for() loop like this: for( int i = 1, double i2 = 0; (在 C++ 中,為什么我不能像這樣編寫 for() 循環: for( int i = 1, double i2 = 0;)
How does OpenMP handle nested loops?(OpenMP 如何處理嵌套循環?)
Reusing thread in loop c++(在循環 C++ 中重用線程)
Precise thread sleep needed. Max 1ms error(需要精確的線程睡眠.最大 1ms 誤差)
Is there ever a need for a quot;do {...} while ( )quot; loop?(是否需要“do {...} while ()?環形?)
主站蜘蛛池模板: 午夜免费av | 久久精品国产亚洲 | 91久久国产综合久久 | 国产一区二区视频在线 | 欧美狠狠操 | 欧美中文字幕 | 成人免费av| www在线播放 | 在线免费观看日韩av | 国产第二区 | 狠狠做深爱婷婷综合一区 | 四虎在线免费观看 | 一级片免费视频 | 在线观看黄色小视频 | 欧美精产国品一二三区 | 日本精品视频 | 日韩一区二区三区视频 | 欧美成人一区二区三区片免费 | 国产精品久久久久久无人区 | 一区二区国产精品 | 欧美精品亚洲 | 久久久精品在线观看 | 国产小视频网站 | 中文字幕激情 | 国产精品嫩草影院桃色 | 最近中文字幕在线 | 日本在线小视频 | 在线观看视频一区二区三区 | 午夜tv| 成人午夜在线视频 | 在线观看中文字幕 | 欧美www| 在线观看黄色片 | 欧美一区二区在线视频 | 99re在线| 黄色在线免费看 | 欧美 日韩 国产 成人 在线 | 一级毛片av | www.日本黄色 | 99视频网站| 99精品在线|