【发布时间】:2010-03-31 18:19:26
【问题描述】:
有人有 C++ 内存优化指南的资源吗?最佳实践、调优等?
举个例子:
Class xxx {
public:
xxx();
virtual ~xxx();
protected:
private:
};
由于在这个类中没有受保护和私有的项目,编译器或内存分配是否有任何好处来摆脱受保护和私有?
更新:什么是程序员这样做:
Class xxx {
public:
xxx();
virtual ~xxx();
public:
more stuff();
more();
ifndef __BUILD_WIN__
public:
even more();
envenmore2();
endif
protected:
private:
};
【问题讨论】:
-
您能否添加有关您正在工作的问题域的任何信息?
标签: c++ performance optimization compiler-construction