Start a new topic

Bad usage of memory

Bad usage of memory


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

 

Best regards

Andreas

I sent it.

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

Best regards

Andreas

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

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

If your project does NOT USE ARC, you need to call to delete the object. But your project SHOULD USE ARC!

Best regards

Andreas

Can any one help me ?

Thank you Andreas for reply,

I use WikitudeSDK_iOS_4_0_0.

I use the Code of Examples of WikitudeSDK_iOS_4_0_0.

And I make Google Places map URLrequest before calling "presentARViewControllerFromString". I created UITableViewController with rows with is places types like: Cafe, Bank, Hospital ... etc. And every time user click on row I start Wikitude through this method : "presentARViewControllerFromString".

Every time I start Wikitude Memory increase exponentially. But I found "tmp/com.wikitude.sdk" folder is empty.

Also, I used "viewWillDisappear" in my ViewControllers (most of them) to release and nil "architectView" and "standardARViewController". My app isn't ARC.

How can I delete view controller / architect view and where ? What is wrong in my sequence ?

Hi heba,
which version of the iOS SDK do you use? All 4.x versions should fix the issue.

Do you manage the WTArchitectView using a UIViewController subclass? How do you present the WTArchitectView containing view controller? Maybe you never delete your view controller / architect view?

Best regards

Andreas

please, What was the solution ?

I'm working on iOS.

I make multi screen on app, one of them is for Wikitude.

Every time I open its screen/window, memory increase  ~ 20 M or more.I face memory crash.

I call "AR.context.destroyAll();" when I close its window to open another.

What can I do ?

Thank you,

Heba

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

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

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

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

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 
Login or Signup to post a comment