- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
作为一个例子考虑这个结构
struct Foo
{
ComPtr<ID3D11Texture2D> back_buffer;
ComPtr<IDXGISwapChain> swap_chain;
ComPtr<ID3D11DeviceContext> device_context;
ComPtr<ID3D11Device> device;
}
此处调用 release() 的顺序与创建这些 COM 对象的顺序相同。它会导致任何问题吗?
最佳答案
一般来说,COM 对象的释放顺序严格来说是无关紧要的。也就是说,Direct3D 在生命周期中不使用严格的 COM 规则。一旦您释放了对 Direct3D 设备的最后一个引用,那么该设备的所有子对象都将无效,无论它们各自的引用计数是多少。
为了更容易进行清理,Direct3D 调试设备中有“对象泄漏检测”功能,因此在释放最终设备实例之前干净地释放所有内容会很有帮助。参见 Direct3D SDK Debug Layer Tricks和 DXGI Debug Device .
请记住,对象到对象的引用也可以使计数保持事件状态,并且 Direct3D 使用“延迟销毁”。因此,“干净退出”需要在您取消绑定(bind)所有对象后进行刷新:
m_d3dContext->ClearState();
m_d3dContext->Flush();
// Release all your objects except the device
// Final release of the device here
You don't have to use such a clear & flush for cleanup with Direct3D 11, but you'll end up with a lot of 'false reports' of live objects by the Debug Layer if you don't
Flush
after unbinding. With Direct3D 12, you have to ensure the GPU is idle before you start releasing things to get a clean exit.
关于c++ - Direct3D COM 接口(interface)的发布顺序重要吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40577247/
什么是事物 事务是一种机制、一个操作序列,包含了一组数据库操作命令,并且把所有的命令作为一个整体一起向系统提交或撤销操作请求,即这组数据库命令要么都执行,要么都不执行。 事务是一个不可分割的工.作逻辑
什么是范式? 简言之就是,数据库设计对数据的存储性能,还有开发人员对数据的操作都有莫大的关系。所以建立科学的,规范的数据库是需要满足一些规范来优化数据数据存储方式。在关系型数据库中这些规范就可以称为范
什么是事物 事务是一种机制、一个操作序列,包含了一组数据库操作命令,并且把所有的命令作为一个整体一起向系统提交或撤销操作请求,即这组数据库命令要么都执行,要么都不执行。 事务是一个不可分割的工.作逻辑
什么是范式? 简言之就是,数据库设计对数据的存储性能,还有开发人员对数据的操作都有莫大的关系。所以建立科学的,规范的数据库是需要满足一些规范来优化数据数据存储方式。在关系型数据库中这些规范就可以称为范
我正在尝试修改网站的布局,但有时网站会使用 !important,有没有办法覆盖它?我似乎无法弄清楚如何在页面的 css 文件之后加载 css 内容脚本。 最佳答案 !important CSS 规则
这个问题在这里已经有了答案: How to override !important? (12 个答案) 关闭 9 年前。 我写了一些 html,并在第三方网站中注入(inject)了一些 css 样
好的,我在这里安装了一个 wordpress 主题(www.sullivansuccesscoaching.com/home ...我们需要/home,因为仍然有一个 index.html 隐藏了 w
我已经为我的 Wordpress 模板创建了一个覆盖原始 CSS 的自定义样式表。但是,在我的日历页面上,原始 CSS 具有使用 !important 声明设置的每个表格单元格的高度: td {hei
这个问题在这里已经有了答案: How to document deconstructed parameters with JsDoc (1 个回答) 关闭 5 年前。 我正在努力寻找对文档 ES6
我的网站使用 bootstrap 4 和我制作的 css 文件。 在这个 css 文件的底部,我放置了一些媒体查询: @media (max-width: 575px) { .address .c
可以将 background-position X 设置为 0 带有标志 !important 和背景位置 Y 不带 !important? 例如: background-position-x: 0
我只想在焦点状态下去掉下拉列表中的轮廓。看这张图 我尝试使用 !important 覆盖 Bootstrap ,但根本不起作用。只是检查开发工具,突然看到这个。 Bootstrap 也使用 !impo
这个问题在这里已经有了答案: How to override !important? (12 个答案) 关闭 1 年前。
发生了什么事?:我的 jQuery Accordion 的动画坏了。在关闭上一个选项卡之前短时间单击下一个选项卡后,它会显示之前打开的选项卡。动画也不滑动。 CSS:来自this answer /*
如何使用 javascript 或 CSS 覆盖样式“color: red”?我想让它成为“2px”而不是“1px”边框。 Lorem... 我无法向“div”添加类、id。这不
这个问题在这里已经有了答案: How to override !important? (12 个答案) 关闭 5 年前。
滚动有问题不想显示其内容,如果我这样做 #callCenter { position: fixed; z-index: 2411 !important; display: bl
序言 1、MySQL表操作(创建表,查询表结构,更改表字段等), 2、MySQL的数据类型(CHAR、VARCHAR、BLOB,等), 本节比较重要,对数据表数据进行查询操作,其中可能大
如何将!important添加到客户端包GWT中的gwt-image: 我有这个: @sprite .superButton{ gwt-image : 'superButton'; backg
请帮助我..我想验证表单并使用 ajax 发送。 验证没有 ''onsubmit="return validateForm(this);"'' 工作。 但是当表单正确时,它的发送表单(页面刷新..)请
我是一名优秀的程序员,十分优秀!