Start a new topic

Bad usage of memory

Bad usage of memory


Yes, my original project isn't ARC for now.

BUT, I test Wikitude on small ARC project. And I take your SDK Example code (Whole classes as it's).

Some code which I use to clear objects is in WTStandardARViewController Class ( I don't want it in AppDelegate ):

- (void)viewWillDisappear:(BOOL)animated

{

    ;

    ;

    ;

    self.architectView = nil;

   }

}

Is that correct ?

What are real objects which must be nil to clear memory ?

If there is any chance to send you this small project to see, tell me.

 

Thank you,

Heba

Any updates about this issue?

I have to buy the license and I have to release the app during this week and I will not proceed to purchase the license if you don't solve this issue, sorry.

Hi Luca!
Sorry for the late response but we're currently preparing the Wikitude SDK 4.0 so we're all very busy at the moment getting things done.
We have planned to extend the SDK with some functionality that you can use to handle your problem. But maybe you can also do something to get your app working as expected.
First, the AR.context.destroyAll() does not affect the tmp directory handling, so it does not have any effect, especially because the 'willTerminate' delegate mehtod is only called if the system or user kills the app. You should prefer using 'applicationDidEnterBackground'.
Because we want provide you a solution this week, we will discuss the next steps today and give you detailed feedback until tomorrow morning.

What I can safely say so far is, that if you nil out your ArchitectView object and create a new one once your start the AR experience, all folders will be removed (if you're using the latest Developer Channel Release). In detail, All folders will be removed once a new ArchitectView instance is created.
 

Best regards

Andreas

 

Thank you Andreas. I will do how you say and I will wait for the new release, hoping there will be not major changes to the existing code 

Ok Andreas, my situation now is that I have to publish a new demo to customers next week, start of October.

And this demo will include Wikitude feature or not, that depends on memory issue. And for now could help.

Thank you,

Heba

During testing one question came into my mind: When do you init your WTArchitectView instance and when do you call -loadArchitectWorldFromUrl? Might it be the case that you load the Architect World each time the ArchitectView becomes visible again?

Best regards

Andreas

Hi Andreas, I'm glad to let you know that I may solve the issue doing as you said, nilling out and initiliazing the WTArchitect when I start the ViewController. I will notice you if the problem will still represent

Hi Luca,
Thats good news!
But just as a double check. As long as there is no folder called /tmp/com.wikitude.sdk/*hash*x (or multiple 'x'), you don't have any problems. All 3d models are located in the applications sandbox tmp folder and can't be deleted until a new instance of the WTArchitectView is created (we need those files to load the 3d models in OpenGL). Thats the reason why we delete this folder only at creation time and not during the usage of the SDK. 

Best regards and thx for using the Wikitude SDK

Andreas

The 'com.wikitude.sdk' folder exists and is empty. It seems to be solved. Really thanks!

send me your demo project to ios-sdk@wikitude.com and I will have a look at it.

Best regards

Andreas

I sent it.

I received it and will have a look at it today or tomorrow. Keep you up to date ;)

 

Best regards

Andreas

Hi,

I'm trying to view many 3D models in my iOS app, but after I loaded it, documents and data memory usage increase exponentially (app: 20mb, documents and data: 300/400mb). 

3d models weight always are < 15mb. I saw that there is an imponent memory leak of OpenGLES. How can I fix it? I tried deleting all AR.* object closing the app like the cache data of the app ;

 
Login or Signup to post a comment