简体   繁体   English

解雇后未释放Aviary ios SDK内存

[英]Aviary ios SDK memory not released after dismiss

I am using Aviary SDK 3.0 in my app, I put the Aviary code in a popover like this, but after I dismissed the popover using [popover dismissPopoverAnimated], the Aviary is still in the memory Heap, this is even true, even after I dismissed the parent viewcontroller. 我在应用程序中使用Aviary SDK 3.0,将Aviary代码放在这样的弹出窗口中,但是在使用[popover dismissPopoverAnimated]删除了弹出窗口之后,Aviary仍然在内存堆中,即使在我之后解雇了父viewcontroller。 is it expected that the Aviary code is cleaned up after I dismiss? 我被解雇后,预期会清理鸟舍代码吗?

in the action when use tap the photo. 在使用时的动作中,点击照片。 I present it here 我在这里展示

    AFPhotoEditorController *editorController = [[AFPhotoEditorController alloc] initWithImage:imageToEdit];
    [editorController setDelegate:self];

    if (popover == nil)
        popover = [[UIPopoverController alloc] initWithContentViewController:editorController];
    else
        [popover setContentViewController:editorController animated:YES];

https://dl.dropboxusercontent.com/u/23238574/Screenshots/aviarypopover.png https://dl.dropboxusercontent.com/u/23238574/Screenshots/aviarypopover.png 在此处输入图片说明

From the docs: 从文档:

"Note that pushing the controller onto a UINavigationController's stack is not recommended, since the Photo Editor itself uses a subclass of UINavigationController." “请注意,不建议将控制器推入UINavigationController的堆栈,因为照片编辑器本身使用UINavigationController的子类。”

try presenting it modally, then what I do just to make me feel better about all memory getting cleaned is to make a strong property and go through the checklist 尝试以模态展示它,然后为了使我对所有被清除的内存感觉更好,我要做的就是制作一个坚固的属性并通过清单

[editorController removeFromParentViewController];
editorController.delegate = nil;
editorController = nil;

something about clearing the delegate seems to clear my memory better, although, I don't think you need it. 尽管我认为不需要,但有关清除代表的一些内容似乎可以更好地清除我的记忆。

also, don't forget: 另外,不要忘记:

"By default, Aviary keeps a small number of OpenGL objects loaded to optimize launches of Aviary products." “默认情况下,Aviary会保留少量的OpenGL对象,以优化Aviary产品的启动。”

[AFOpenGLManager requestOpenGLDataPurge];
// to request a clear, 
// "Calls to requestOpenGLDataPurge only apply to the currently loaded OpenGL data,"

You can set it to clear regularly with 您可以将其设置为定期清除

[AFPhotoEditorCustomization purgeGPUMemoryWhenPossible:YES];

if you're doing this, it's a good idea to preload some of the editor if you know they'll be using it soon 如果您正在执行此操作,则最好预先加载一些编辑器(如果您知道他们很快就会使用它)

[AFOpenGLManager beginOpenGLLoad];

This memory leak has been addressed in subsequent releases of the SDK. 此内存泄漏已在以后的SDK版本中解决。 Please visit developers.aviary.com to get the latest version. 请访问developers.aviary.com以获取最新版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM