Skip to content

优海

人,技术,生活。

  • 常用
  • 生活
  • 历史
  • 技术
  • 编程
  • 软件

Day: September 29, 2022

Deconstruction order of class members

September 29, 2022 by euhat
1
2
3
4
5
6
7
8
class A1
{
	~A1();
	...
	B1 m_b1;
	C1 m_c1;
	D1 m_d1;
};

class A1 { ~A1(); ... B1 m_b1; C1 m_c1; D1 m_d1; };

Through practice in gcc, I found the deletion order of class A1 is: ~A1(), m_d1, m_c1, m_b1, ...

Categories 编程 Tags 成员变量, 析构顺序, 类
September 2022
M T W T F S S
 1234
567891011
12131415161718
19202122232425
2627282930  
« Aug   Oct »

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Email:
euhat@hotmail.com
wolinux@163.com

鄂ICP备14020742号-1

Tags

Android bash c Chrome cmake debug dpdk epoll Euhat fedora ffmpeg gdb include ipsec jni kernel Linux mat MFC mp4 NDK ofp opencv openssl printf python qt Rtsp source StrongSwan tcp ubuntu UE4 vmware win32 Windows 命令行 失败 年表 控件 日语 源码 皇帝 禁止 编译
© 2025 优海 • Built with GeneratePress