上代码,看看注释

ScopedNSAutoreleasePool只有Mac系统特有的,也可以理解为OC特有的函数,

其他系统为空实现

 
// On the Mac, ScopedNSAutoreleasePool allocates an NSAutoreleasePool when
// instantiated and sends it a -drain message when destroyed. This allows an
// autorelease pool to be maintained in ordinary C++ code without bringing in
// any direct Objective-C dependency.
//
// On other platforms, ScopedNSAutoreleasePool is an empty object with no
// effects. This allows it to be used directly in cross-platform code without
// ugly #ifdefs.
class ScopedNSAutoreleasePool {
public:
#if !defined(OS_MACOSX)
ScopedNSAutoreleasePool() {}
void Recycle() { }
#else // OS_MACOSX
ScopedNSAutoreleasePool();
~ScopedNSAutoreleasePool(); // Clear out the pool in case its position on the stack causes it to be
// alive for long periods of time (such as the entire length of the app).
// Only use then when you're certain the items currently in the pool are
// no longer needed.
void Recycle();
private:
NSAutoreleasePool* autorelease_pool_;
#endif // OS_MACOSX private:
DISALLOW_COPY_AND_ASSIGN(ScopedNSAutoreleasePool);
};

chromium之ScopedNSAutoreleasePool浅析的更多相关文章

  1. chromium之MessageLoop浅析

    对chromium的MessageLoop非常感兴趣,接下来会详细分析Windows平台的具体实现. 代码版本:chromium-4.0.210.0_p26329 先看一下依赖的文件 message_ ...

  2. jQuery 3.0 的 Data 浅析

    jQuery 3.0 在6月9日正式发布了,3.0 也被称为下一代的 jQuery .这个版本从14年10月开始,其中发布过一次beta 版(2016/1/14,)和候选版(2016/05/20).一 ...

  3. chromium源码阅读--进程的Message Loop

    上一篇总结了chromium进程的启动,接下来就看线程的消息处理,这里的线程包含进程的主进程. 消息处理是由base::MessageLoop中实现,消息中的任务和定时器都是异步事件的. 主要如下几点 ...

  4. 浅析HSTS

    浅析HSTS 一.HSTS是什么? HSTS全称:HTTP Strict Transport Security,意译:HTTP严格传输安全,是一个Web安全策略机制. 二.HSTS解决什么问题? 它解 ...

  5. 浅析android应用增量升级(转)

    By 何明桂(http://blog.csdn.net/hmg25) 转载请注明出处 很久没有更新博客了,真是堕落啊,几次想提起笔,却总是被各种琐事耽搁,以后会多写文章记录点滴. 背景         ...

  6. SQL Server on Linux 理由浅析

    SQL Server on Linux 理由浅析 今天的爆炸性新闻<SQL Server on Linux>基本上在各大科技媒体上刷屏了 大家看到这个新闻都觉得非常震精,而美股,今天微软开 ...

  7. 【深入浅出jQuery】源码浅析--整体架构

    最近一直在研读 jQuery 源码,初看源码一头雾水毫无头绪,真正静下心来细看写的真是精妙,让你感叹代码之美. 其结构明晰,高内聚.低耦合,兼具优秀的性能与便利的扩展性,在浏览器的兼容性(功能缺陷.渐 ...

  8. 高性能IO模型浅析

    高性能IO模型浅析 服务器端编程经常需要构造高性能的IO模型,常见的IO模型有四种: (1)同步阻塞IO(Blocking IO):即传统的IO模型. (2)同步非阻塞IO(Non-blocking  ...

  9. netty5 HTTP协议栈浅析与实践

      一.说在前面的话 前段时间,工作上需要做一个针对视频质量的统计分析系统,各端(PC端.移动端和 WEB端)将视频质量数据放在一个 HTTP 请求中上报到服务器,服务器对数据进行解析.分拣后从不同的 ...

随机推荐

  1. 小小的js

    //安全登陆不允许iframe嵌入 if (window.top !== window.self) { window.top.location = window.location; } 使用filte ...

  2. ERROR:Tried to register widget id ==basemapGalleryDiv but that id is already registered解决办法

    在ArcGIS Server开发中,遇到DIV已经被注册的情况,不能对原DIV内容进行更新.这里需要调用Dojo的destroyRecursive()方法,逐个销毁该Widget下的子元素及其后代元素 ...

  3. 万网云解析全面升级开放,支持海外IP解析!

    基于万网过去18年来的专业域名解析服务经验,万网云解析新版实现了承载超过300万域名的全面升级,它是万网DNS域名解析系统的全新升级,目前已正式发布上线,详见万网首页:http://www.net.c ...

  4. KLEE错误汇报一:One phenomenon after the execution using klee

    https://github.com/klee/klee/issues/649#issuecomment-300424204 Hi, all,      If you write test.c wit ...

  5. Data truncation: Out of range value for column 'id' at row 1 ### The

    org.springframework.dao.DataIntegrityViolationException: ### Error updating database. Cause: com.mys ...

  6. tomcat启动很慢 停留在 At least one JAR was scanned for TLDs yet contained no TLDs.

    部署项目时候,发现启动特别慢,要等好几分钟,这不正常啊.然后每次部署都停留在 At least one JAR was scanned for TLDs yet contained no TLDs. ...

  7. beifencode

    package com.hesheng.myapplication; import android.content.Context;import android.graphics.Bitmap;imp ...

  8. SQL Server ->> 高可用与灾难恢复(HADR)技术 -- AlwaysOn可用性组(理论篇)

    因为篇幅原因,AlwaysOn可用性组被拆成了两部分:理论部分和实战部分.而实战部分又被拆成了准备工作和AlwaysOn可用性组搭建. 三篇文章各自的链接: SQL Server ->> ...

  9. SQL Server 2017 on Linux

    此文转载,原文地址:https://docs.microsoft.com/zh-cn/sql/linux/sql-server-linux-whats-new CTP 2.0 The CTP 2.0 ...

  10. Apache2.4和IIS7整合共享80端口测试

    言我再重新排版一下 在C:\Windows\System32\drivers\etc\hosts文件中配置2个测试域名用于整合测试 127.0.0.1 www.aaa.com // apache项目 ...