Giter Club home page Giter Club logo

Comments (10)

mssjappjwt avatar mssjappjwt commented on June 18, 2024 3

Thank you!

To give you a little more context, in my case I have a button that can switch between AR camera and normal camera. So if you choose to programmatically initialize and add ARSCNView to the view hierarchy based on certain action. You'll have UIViewController holding a strong reference to ARSCNView, UIViewController holding a strong reference to RecordAR and RecordAR holding a strong reference to ARSCNView. And I saw in your source code RecordAR also holds a strong reference to ARSCNView's parent view controller which might cause a retain cycle (Didn't look too deep into the source code, I think this is the case).

from arvideokit.

AFathi avatar AFathi commented on June 18, 2024

Will investigate the issue and get back to you soon.

from arvideokit.

devajith avatar devajith commented on June 18, 2024

facing the same issue. RecordAR holding strong reference to the ARSCNView.

from arvideokit.

devajith avatar devajith commented on June 18, 2024

@mssjappjwt did you find any workaround for this like passing unowned or weak ARSCNView ?

from arvideokit.

tulaomaod avatar tulaomaod commented on June 18, 2024

how to fix

from arvideokit.

anilios avatar anilios commented on June 18, 2024

Facing same issue, app crashing..

from arvideokit.

tulaomaod avatar tulaomaod commented on June 18, 2024

Facing same issue, app crashing..

from arvideokit.

dneprDroid avatar dneprDroid commented on June 18, 2024

Taking a global strong reference to view object is a bad idea:

import Foundation
import ARKit

private var view: Any? // this must be instance & weak variable!
private var renderEngine: SCNRenderer! // instance variable too 

@available(iOS 11.0, *)
struct RenderAR {
    var ARcontentMode: ARFrameMode!
    .....

private var view: Any?

... and other classes.

from arvideokit.

AFathi avatar AFathi commented on June 18, 2024

@dneprDroid

Feel free to submit a pull request with the fixes.

from arvideokit.

asam139 avatar asam139 commented on June 18, 2024

I have checked it, and with these changes component is deallocated. #82

from arvideokit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.