Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.

Memory problems when adding images (trackers) to AugmentedImageDatabase (runtime) #762

Open
L4Hacks opened this issue Oct 19, 2020 · 2 comments
Labels

Comments

@L4Hacks
Copy link

L4Hacks commented Oct 19, 2020

SPECIFIC ISSUE ENCOUNTERED

I have an app that only creates an AugmentedImageDatabase in runtime. When adding images to the database, it takes A LOT of memory from my device (almost all memory).
I have used Unity profiler to see this, and i'have also bought an asset (from the AssetStore) to check the current available memory [same results - see the attached picture]).

I'm adding images to the database like this:
"Texture2Dtex = new Texture2D(2, 2);
tex.LoadImage(fileData);
AugmentedImageSrc image = new AugmentedImageSrc(tex);
db.AddImage(sceneInfo.Id + "-" + triggerInfo.Id.ToString(), image);"

Each time i call this method, my free RAM drops approximatly 250Mb.

This is a really strange behaviour, since if I start the Scene with a AugmentedImageDatabase already populated (with the same images), i get all the available memory free!
Is there any way to realese unused memory after adding the images to the database? Is it possible to serialize the database, destroy everything and load it after (to get free memory)?

Also, is there any way to destroy the database and realease the memory? I cant seem to do this.

VERSIONS USED

  • Unity: 2020.1.4f1
  • ARCore SDK for Unity: 1.19.0
  • Device manufacturer, model, and O/S: Samsung Tab S6, Android 10

ARCore

@L4Hacks L4Hacks added the bug label Oct 19, 2020
@L4Hacks
Copy link
Author

L4Hacks commented Nov 4, 2020

Can anyone help with this? Is there any way to serialize & upload a AugmentedImageDatabase to a server, and download & deserialize it after?

@L4Hacks
Copy link
Author

L4Hacks commented Nov 11, 2020

almost 1 month later .. thanks for not helping :/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant