pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

<tfoot id='asPep'></tfoot>

          <bdo id='asPep'></bdo><ul id='asPep'></ul>
        <legend id='asPep'><style id='asPep'><dir id='asPep'><q id='asPep'></q></dir></style></legend>
      1. <small id='asPep'></small><noframes id='asPep'>

        <i id='asPep'><tr id='asPep'><dt id='asPep'><q id='asPep'><span id='asPep'><b id='asPep'><form id='asPep'><ins id='asPep'></ins><ul id='asPep'></ul><sub id='asPep'></sub></form><legend id='asPep'></legend><bdo id='asPep'><pre id='asPep'><center id='asPep'></center></pre></bdo></b><th id='asPep'></th></span></q></dt></tr></i><div class="hnhzlrt" id='asPep'><tfoot id='asPep'></tfoot><dl id='asPep'><fieldset id='asPep'></fieldset></dl></div>
      2. iOS5.0.1 上的內存泄漏 drawInRect

        Memory leak drawInRect on iOS5.0.1(iOS5.0.1 上的內存泄漏 drawInRect)
          <tbody id='Gejgy'></tbody>

            1. <legend id='Gejgy'><style id='Gejgy'><dir id='Gejgy'><q id='Gejgy'></q></dir></style></legend>
                • <bdo id='Gejgy'></bdo><ul id='Gejgy'></ul>

                  <small id='Gejgy'></small><noframes id='Gejgy'>

                • <i id='Gejgy'><tr id='Gejgy'><dt id='Gejgy'><q id='Gejgy'><span id='Gejgy'><b id='Gejgy'><form id='Gejgy'><ins id='Gejgy'></ins><ul id='Gejgy'></ul><sub id='Gejgy'></sub></form><legend id='Gejgy'></legend><bdo id='Gejgy'><pre id='Gejgy'><center id='Gejgy'></center></pre></bdo></b><th id='Gejgy'></th></span></q></dt></tr></i><div class="d77rznf" id='Gejgy'><tfoot id='Gejgy'></tfoot><dl id='Gejgy'><fieldset id='Gejgy'></fieldset></dl></div>

                  <tfoot id='Gejgy'></tfoot>
                • 本文介紹了iOS5.0.1 上的內存泄漏 drawInRect的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我有以下用于縮放圖像的代碼片段.這是在一個循環中,為每次傳遞創建和排出一個自動釋放池.此代碼在 iOS5.0 的模擬器、iPad 上的 iOS4.3 或模擬器中運行良好,但在 iPad1 上的 iOS5.0.1 上,經過 50-60 次后,drawInRect 開始消耗永遠不會釋放的內存.我一直在從輔助線程調用它,但現在在主線程上調用縮放操作.

                  I have the following code fragment that I use to scale images. This is in a loop that creates and drains an autorelease pool for each pass. This code works fine in the simulator in iOS5.0, in iOS4.3 on iPad or simulator, but on iOS5.0.1 on an iPad1, after 50-60 passes, drawInRect starts consuming memory that never gets released. I had been calling this from a secondary thread, but now invoke the scaling operations on the main thread.

                  UIGraphicsBeginImageContext( newSize );
                  [image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
                  UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
                  UIGraphicsEndImageContext();
                  

                  是我做錯了什么還是 iOS5.0.1 的錯誤?

                  Am I doing something wrong or is this an iOS5.0.1 bug?

                  更新:我已經嘗試了很多測試.我已經能夠證明用 XCode 4.0 編譯的完全相同的代碼在同一臺 iPad 上運行良好.使用 XCode 4.2.1 編譯的相同代碼會導致內存不足.此縮放例程正在后臺線程中調用.我使用較低級別的核心圖形調用編寫了一個不同的縮放例程.XCode 4.0 不會泄漏,但在我的 XCode 4.2.1 應用程序中會泄漏.在獨立項目中運行的完全相同的例程和調用樹似乎不會在 XCode 4.2.1 上泄漏(大量)內存.我正在等待 Apple 關于這個的消息.同時,我需要使用 XCode 4.我擁有的唯一安裝映像需要 Snow Leopard,這意味著我正在使用我的 5.5 年舊機器.謝謝

                  Update: I've tried many tests. I have been able to prove that the exact same code compiled with XCode 4.0 runs fine on the same iPad. Same code compiled with XCode 4.2.1 causes an out of memory condition. This scaling routine is being invoked in a background thread. I wrote a different scaling routine using lower level core graphics calls. It doesn't leak with XCode 4.0 but does leak when in my application with XCode 4.2.1. The exact same routine and invocation tree run in a stand alone project does not appear to leak (much) memory on XCode 4.2.1. I'm waiting to hear from Apple on this one. In the mean time I need to use XCode 4. The only install image I have requires Snow Leopard which means I'm using my ancient 5.5 yr old machine. Thanks

                  2012 年 1 月更新這似乎僅在應用程序從 XCode 中啟動時才會發生.在 iPad 上啟動的相同可執行文件沒有泄漏.具有相同例程的不同應用不會出現泄漏.

                  Update 1/2012 This only seems to occur if the app is started from within XCode. Same executable started on the iPad does no exhibit the leak. A different app with the same routine does not exhibit the leak.

                  我已向 Apple 打開了一份錯誤報告,并向他們發送了一個重現該問題的項目.我預計它不會很快得到解決,但它似乎并不像我最初想象的那樣普遍.

                  I've opened a bug report with Apple and have sent them a project which reproduces the problem. I don't expect it to be resolved anytime soon, but it doesn't seem as pervasive as I originally thought.

                  2012 年 6 月更新盡管已向 Apple 發送了一個重現該問題的最小項目,但他們聲稱無法重現該問題并且沒有取得任何進展.

                  Update 6/2012 Despite having sent Apple a minimal project which reproduced the problem, they claim not to be able to reproduce the problem and are not making any progress on it.

                  推薦答案

                  我相信我終于找到了內存泄漏的原因.在進行一些核心數據插入時,我發現了類似的行為.循環,創建許多被釋放的對象.在 iPad 上運行時,內存使用量會上升,但在應用程序因內存不足而崩潰之前沒有明顯的泄漏.但是當從設備啟動時,它運行沒有問題.

                  I believe I have FINALLY found the cause of the memory leak. I discovered similar behavior when doing some Core Data inserts. Looping, creating many objects that are released. When run on iPad, memory usage goes up although no leak is evident until the app crashes out of memory. But when initiated from the device, it runs without a problem.

                  我突然想到它是從 Xcode 開始的.必須是項目中的調試設置.

                  It occurred to me that its something about the way its being started from Xcode. Must be a debug setting in the project.

                  原來問題是由于在調試時使用 NSZombieEnabled 引起的.要在 Xcode 4 中禁用此設置,請右鍵單擊方案,即 app>targetDevice,編輯方案,選擇調試操作,參數選項卡.要啟用 NSZombieEnabled,需要使用該名稱創建一個值為 YES 的環境變量,并啟用該變量.要禁用它,請取消選中該復選框.

                  Turns out the problem was caused by having NSZombieEnabled while debugging. To disable this setting in Xcode 4, right click on the schemes, ie app>targetDevice, edit the scheme, select the Debug action, arguments tab. To enable NSZombieEnabled, an environment variable is created with that name with a value of YES and the variable is enabled. To disable it, uncheck the checkbox.

                  NSZombieEnabled 用于確定您是否嘗試釋放已釋放的對象.為此,環境會跟蹤所有已發布的對象.這會消耗內存,表現為內存泄漏.

                  NSZombieEnabled is used to determine if you attempt to release an object that has already been released. To do this, the environment is keeping track of all released objects. This is consuming memory which appears as a memory leak.

                  禁用此功能后,我的應用程序在 iPad1 上被殺死之前會快速增長超過 115MB,現在可以愉快地坐在 24MB 上,沒有內存泄漏.

                  Once I disabled this, my app that used to quickly grow over 115MB before being killed on an iPad1 now happily sits at 24MB with no memory leak.

                  這篇關于iOS5.0.1 上的內存泄漏 drawInRect的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  How to animate a UIImageview to display fullscreen by tapping on it?(如何通過點擊動畫 UIImageview 以顯示全屏?)
                  To stop segue and show alert(停止 segue 并顯示警報)
                  iOS 5 storyboard, programmatically determine path(iOS 5 故事板,以編程方式確定路徑)
                  Icon already includes gloss effects(圖標已經包含光澤效果)
                  How does UIEdgeInsetsMake work?(UIEdgeInsetsMake 是如何工作的?)
                  UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定義跟蹤和進度圖像(iOS 5 屬性))
                  1. <i id='yTyfI'><tr id='yTyfI'><dt id='yTyfI'><q id='yTyfI'><span id='yTyfI'><b id='yTyfI'><form id='yTyfI'><ins id='yTyfI'></ins><ul id='yTyfI'></ul><sub id='yTyfI'></sub></form><legend id='yTyfI'></legend><bdo id='yTyfI'><pre id='yTyfI'><center id='yTyfI'></center></pre></bdo></b><th id='yTyfI'></th></span></q></dt></tr></i><div class="nxhpdpr" id='yTyfI'><tfoot id='yTyfI'></tfoot><dl id='yTyfI'><fieldset id='yTyfI'></fieldset></dl></div>

                        • <bdo id='yTyfI'></bdo><ul id='yTyfI'></ul>
                          <legend id='yTyfI'><style id='yTyfI'><dir id='yTyfI'><q id='yTyfI'></q></dir></style></legend>

                              <tbody id='yTyfI'></tbody>
                            <tfoot id='yTyfI'></tfoot>

                          1. <small id='yTyfI'></small><noframes id='yTyfI'>

                            主站蜘蛛池模板: 合肥宠物店装修_合肥宠物美容院装修_合肥宠物医院设计装修公司-安徽盛世和居装饰 | 开平机_纵剪机厂家_开平机生产厂家|诚信互赢-泰安瑞烨精工机械制造有限公司 | 篷房|仓储篷房|铝合金篷房|体育篷房|篷房厂家-华烨建筑科技官网 知名电动蝶阀,电动球阀,气动蝶阀,气动球阀生产厂家|价格透明-【固菲阀门官网】 | 合肥地磅_合肥数控切割机_安徽地磅厂家_合肥世佳电工设备有限公司 | 北京晚会活动策划|北京节目录制后期剪辑|北京演播厅出租租赁-北京龙视星光文化传媒有限公司 | 盘煤仪,盘料仪,盘点仪,堆料测量仪,便携式激光盘煤仪-中科航宇(北京)自动化工程技术有限公司 | 沈阳庭院景观设计_私家花园_别墅庭院设计_阳台楼顶花园设计施工公司-【沈阳现代时园艺景观工程有限公司】 | 不锈钢电动球阀_气动高压闸阀_旋塞疏水调节阀_全立阀门-来自温州工业阀门巨头企业 | 储气罐,真空罐,缓冲罐,隔膜气压罐厂家批发价格,空压机储气罐规格型号-上海申容压力容器集团有限公司 | 小区健身器材_户外健身器材_室外健身器材_公园健身路径-沧州浩然体育器材有限公司 | 通辽信息港 - 免费发布房产、招聘、求职、二手、商铺等信息 www.tlxxg.net | 磁粉制动器|张力控制器|气胀轴|伺服纠偏控制器整套厂家--台灵机电官网 | 智能楼宇-楼宇自控系统-楼宇智能化-楼宇自动化-三水智能化 | 威海防火彩钢板,威海岩棉复合板,威海彩钢瓦-文登区九龙岩棉复合板厂 | RS系列电阻器,RK_RJ启动调整电阻器,RQ_RZ电阻器-上海永上电器有限公司 | 明渠式紫外线杀菌器-紫外线消毒器厂家-定州市优威环保 | 连栋温室大棚建造厂家-智能玻璃温室-薄膜温室_青州市亿诚农业科技 | 扬子叉车厂家_升降平台_电动搬运车|堆高车-扬子仓储叉车官网 | 巨野电机维修-水泵维修-巨野县飞宇机电维修有限公司 | 招商帮-一站式网络营销服务|搜索营销推广|信息流推广|短视视频营销推广|互联网整合营销|网络推广代运营|招商帮企业招商好帮手 | 拉力机-万能试验机-材料拉伸试验机-电子拉力机-拉力试验机厂家-冲击试验机-苏州皖仪实验仪器有限公司 | 气力输送设备_料封泵_仓泵_散装机_气化板_压力释放阀-河南锐驰机械设备有限公司 | 细沙回收机-尾矿干排脱水筛设备-泥石分离机-建筑垃圾分拣机厂家-青州冠诚重工机械有限公司 | 深圳品牌设计公司-LOGO设计公司-VI设计公司-未壳创意 | 厂厂乐-汇聚海量采购信息的B2B微营销平台-厂厂乐官网 | 雨燕360体育免费直播_雨燕360免费NBA直播_NBA篮球高清直播无插件-雨燕360体育直播 | AGV叉车|无人叉车|AGV智能叉车|AGV搬运车-江西丹巴赫机器人股份有限公司 | 法兰连接型电磁流量计-蒸汽孔板节流装置流量计-北京凯安达仪器仪表有限公司 | 机械加工_绞车配件_立式离心机_减速机-洛阳三永机械厂 | 温州中研白癜风专科_温州治疗白癜风_温州治疗白癜风医院哪家好_温州哪里治疗白癜风 | 冷藏车-东风吸污车-纯电动环卫车-污水净化车-应急特勤保障车-程力专汽厂家-程力专用汽车股份有限公司销售二十一分公司 | 快干水泥|桥梁伸缩缝止水胶|伸缩缝装置生产厂家-广东广航交通科技有限公司 | 经济师考试_2025中级经济师报名时间_报名入口_考试时间_华课网校经济师培训网站 | 飞利浦LED体育场灯具-吸顶式油站灯-飞利浦LED罩棚灯-佛山嘉耀照明有限公司 | 过滤器_自清洗过滤器_气体过滤器_苏州华凯过滤技术有限公司 | 质检报告_CE认证_FCC认证_SRRC认证_PSE认证_第三方检测机构-深圳市环测威检测技术有限公司 | 活性炭-蜂窝-椰壳-柱状-粉状活性炭-河南唐达净水材料有限公司 | ◆大型吹塑加工|吹塑加工|吹塑代加工|吹塑加工厂|吹塑设备|滚塑加工|滚塑代加工-莱力奇塑业有限公司 | 气动机械手-搬运机械手-气动助力机械手-山东精瑞自动化设备有限公司 | 纯水电导率测定仪-万用气体检测仪-低钠测定仪-米沃奇科技(北京)有限公司www.milwaukeeinst.cn 锂辉石检测仪器,水泥成分快速分析仪-湘潭宇科分析仪器有限公司 手术室净化装修-手术室净化工程公司-华锐手术室净化厂家 | 国产液相色谱仪-超高效液相色谱仪厂家-上海伍丰科学仪器有限公司 |