VuforiaSamples in IOS leaks memory in v2.8.7..if we open image Targets many times,the demo will crash!
- Sort Posts
- 9 replies
- Last post
VuforiaSamples in IOS leak memory
Hi,
you can download the latest SDK and samples here:
https://developer.vuforia.com/resources/sdk/ios
https://developer.vuforia.com/resources/sample-apps
These shoul contain the memory leak fix.
VuforiaSamples in IOS leak memory
Hi Alexandro i am using this sample app as template for my project and i have to submit the app on the store for approval ASAP. can you please tell me how to fix this memory leak on the sample before the you engeneering tesm replease an update?
VuforiaSamples in IOS leak memory
Quick update: our engineering team has resolved this issue; expect fix in forthcoming Vuforia release
(note: date of next release not availabe yet, will update later )
VuforiaSamples in IOS leak memory
I fix this one but video play not smooth,
because it load all video at the same time inside appdelegate method,
What I have done:
remove load video at appdelegate class
move that into method renderFrame
My code:
if (PLAYING != currentStatus) {
GLuint iconTextureID;
switch (currentStatus) {
case READY:
case REACHED_END:
case PAUSED:
case STOPPED: {
// ----- Display play icon -----
iconTextureID = [augmentationTexture[OBJECT_PLAY_ICON] textureID];
break;
}
case ERROR: {
// ----- Display error icon -----
iconTextureID = [augmentationTexture[OBJECT_ERROR_ICON] textureID];
break;
}
default: {
// ----- Display busy icon -----
iconTextureID = [augmentationTexture[OBJECT_BUSY_ICON] textureID];
NSString * filename;
switch (playerIndex) {
case 0:
filename = SMP_PAGE_ONE_VIDEO_NAME;
break;
case 1:
filename = SMP_PAGE_TWO_VIDEO_NAME;
break;
case 2:
filename = SMP_PAGE_THREE_VIDEO_NAME;
break;
default:
filename = SMP_PAGE_ONE_VIDEO_NAME;
break;
}
if ([SMPVideoHelperManager sharedManager].videoHelperID < 0) {
[SMPVideoHelperManager sharedManager].videoHelperID = playerIndex;
VideoPlayerHelper * player = videoPlayerHelper[playerIndex];
[player load:filename playImmediately:YES fromPosition:VIDEO_PLAYBACK_CURRENT_POSITION];
}else{
if (playerIndex != [SMPVideoHelperManager sharedManager].videoHelperID) {
VideoPlayerHelper * currentPlayer = videoPlayerHelper[[SMPVideoHelperManager sharedManager].videoHelperID];
BOOL hasUnloaddSuccessfully = [currentPlayer unload];
if (hasUnloaddSuccessfully) {
NSLog(@"video unloaded propery");
}else{
NSLog(@"video was not unloaded properly");
}
VideoPlayerHelper * player = videoPlayerHelper[playerIndex];
[player load:filename playImmediately:YES fromPosition:VIDEO_PLAYBACK_CURRENT_POSITION];
[SMPVideoHelperManager sharedManager].videoHelperID = playerIndex;
}
}
break;
}
}
So, when you click to to viewFullScreen, you have to unload it, not pause, becuase it is going to load fullscreen.
After you click button done in viewFullScreen you have to :
[self unload];
int playerIndex=[SMPVideoHelperManager sharedManager].videoHelperID;
NSString * filename;
switch (playerIndex) {
case 0:
filename = SMP_PAGE_ONE_VIDEO_NAME;
break;
case 1:
filename = SMP_PAGE_TWO_VIDEO_NAME;
break;
default:
filename = SMP_PAGE_ONE_VIDEO_NAME;
break;
}
[self load:filename playImmediately:YES fromPosition:VIDEO_PLAYBACK_CURRENT_POSITION];
That what I have done
VuforiaSamples in IOS leak memory
1.open 'VuforiaSamples' Demo on iphone
2.choose 'Image Target' item,tap 'start'
3.swap left to show letf menu ,tap first item 'Vuforia Samples' ,then back to main menu
Repeat the above 2-3 steps,the demo will crash.
(open 'Image Targets' item or other item in 'VuforiaSamples' Demo many times )
Glad to hear it.
You're welcome.