- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我将我的应用程序从使用垃圾收集转换为 ARC。该应用程序使用 ScriptingBridge 框架。出于好奇,我使用 Instruments“Leaks”模板运行它,发现有泄漏。 AEDESImpl 对象不是由我的代码直接创建的,它们似乎是由 Scripting Bridge 创建的。我说得对吗?
如果这些泄漏来自 ScriptingBridge,这是否正常,我只能忍受它?
谢谢。
这是一个仪器图像,显示“循环和根”->“泄漏循环”:
我输入了相关部分。
_NSCFArray
+40 ( no ivar ]: AEDescImpl
+56 [ no ivar ]: AEDescImpl
+64 [ no ivar ]: AEDescImpl
+72 [ no ivar ]: AEDescImpl
+80 [ no ivar ]: AEDescImpl
+88 [ no ivar ]: AEDescImpl
+96 [ no ivar ]: AEDescImpl
Peter's comment about including the method findOpenTuner in its entirety spurred me to create a "mini" project. The method in question was large and had many methods calls so I reduced the method down to its essence. I added a for loop to call the method 24 times as it ran so fast Instruments did not have any chance to see anything.
Out of curiosity, I commented out the for loop on EyeTVPlayer_window and ran Instruments on that and found no leaks or cycles. With this for loop uncommented as seen below, the leaks are present. It seems to me that either my coding is not correct or Scripting Bridge is leaking.
The "mini" project's implementation file.
#import "AppDelegate.h"
#import "EyeTV.h"
@implementation AppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSUInteger i;
for (i=0; i<25; i++) {
NSLog(@"before i=%li", i);
[self findOpenTuner];
NSLog(@"after i=%li", i);
}
}
- (void)findOpenTuner;
{
EyeTVApplication *eyeTVApp;
eyeTVApp = [SBApplication applicationWithBundleIdentifier:@"com.elgato.eyetv"]; // 08-04-2011 needed to do mute below in method call filterPlayVolumeMute
SBElementArray *eyeWindows = [eyeTVApp player_windows]; // are EyeTVWindow
BOOL openTunerFound = FALSE; // 07-21-2010
int j=0;
for (EyeTVPlayer_window *eyeWin in eyeWindows) // 12-07-2012 #1
{
if ([[eyeWin programInfo] count] == 0) {
} else {
// this is the tuner we want
openTunerFound = FALSE; // 07-21-2010
[eyeWin select]; // 07-21-2010 // moves "focus" to window, places it at index 0
break; // 07-21-2010 // got the tuner, leave loop
}
j++;
}
}
@end
“迷你”项目的仪器屏幕截图。
最佳答案
ScriptingBridge 也存在同样的问题。我最终用自动释放池封装了负责的代码。
@autoreleasepool {
// Leaking code
}
这消除了最大的泄漏,现在它只在我的应用程序上泄漏几个字节。
关于cocoa - 脚本桥 : Are These Leaks Mine or Scripting Bridge?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13925014/
我的 ADT(Android 开发人员工具)工作正常,几天前它显示所有文件的图形布局,但今天它显示“无法加载 LayoutLib:com.android.layoutlib.bridge.Bridge
我正在尝试使用以下命令控制是否将通过我在 Docker 容器中设置的网桥的数据包发送到 iptables 进行处理: sysctl -w net.bridge.bridge-nf-call-ipt
我正在努力创建自己的自定义组件,以便与蓝牙设备进行交互。 I tried this in Swift , 但由于访问桥的问题而没有到达任何地方。 我在 Objective-C 中重新实现它并遇到了同样
是否有任何方法可以确定或任何资源可以找到 Haswell、Sandy Bridge、Ivy Bridge 和 Skylake Intel 处理器的分支目标缓冲区大小? 最佳答案 检查 Agner Fo
有什么解决办法吗? Error starting daemon: Error initializing network controller: could not delete the default
在 WSL2 中运行 docker info(在 ArchWSL 和 Ubuntu 20.04 上)我收到以下警告: WARNING: bridge-nf-call-iptables is disab
我正在使用 ansible 设置 kubernetes 集群。尝试启用内核 IP 路由时出现以下错误: Failed to reload sysctl: sysctl: cannot stat /pr
停止 docker 后,它拒绝重新启动。它提示另一个名为 docker0 的网桥已经存在: level=warning msg="devmapper: Base device already exis
我将这些文件从 Finder 直接添加到我的项目中,然后添加到 Xcode。 桥接 header 由 Xcode 自动创建。 #import 将类导入桥接 header - 桥接 header 没有问
我按照 Google Sign-in for iOS 上的所有说明进行操作使用CocoaPods(尽管我以前没有使用过CocoaPods,但仍然不明白它是什么),当我运行程序时,我收到此错误: bri
概述 桥接模式一种结构型模式,它主要应对的是:由于实际的需要,某个类具有两个或以上的维度变化,如果只是用继承将无法实现这种需要,或者使得设计变得相当臃肿。 桥接模式的做法是把变化的部分抽象出来,使
Android webView 不支持 Google oAuth。 Google 建议使用 chrome 自定义标签进行 oAuth。我也有从我的网络应用程序到 native 的 js 调用的要求。如
我正在从事一个网络项目,出于某种原因,我需要修改 Linux 中使用的网桥的源代码。我想知道如何添加 http://lxr.free-electrons.com/source/net/bridge/源
Docker 似乎在容器开始运行后创建了一个桥,然后与我的主机网络发生冲突。这不是默认的桥 docker0,而是在容器启动后创建的另一个桥。我可以根据较旧的用户指南链接 https://docs.do
桥接模式属于先天模式,这里的先天模式就是说一开始就要把结构搭建好,方便后来的扩展,而不是对已经出现的模块和接口进行改进扩展的。桥接的核心在于实体类和操作类之间的聚合关系,这个聚合关系就是我们所说的&
1、桥梁模式结构图 2、桥梁模式中主要角色 抽象化(Abstraction)角色:定义抽象类的接口并保存一个对实现化对象的引用。 修正抽象化(Refined Abstractio
代码如下: <?php /** * 桥接模式 * * 将抽象部份与它实现部分分离,使用它们都可以有独立的变化 */
题目地址:https://leetcode.com/problems/shortest-bridge/description/ 题目描述 Ina given 2D binary array A,
桥接模式(Bridge Pattern)是用于把抽象化与实现化解耦,使得二者可以独立变化 桥接模式涉及到一个作为桥接的接口,使得实体类的功能独立于接口实现类,这两种类型的类可被结构化改变而互不影响
LocalAppData为由 Desktop App Converter 转换的应用程序虚拟化. 例如。 “真实”LocalAppData地点是: C:\Users\user\AppData\Loca
我是一名优秀的程序员,十分优秀!