FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Memory problem in version 1.3.1?

2 posters

Go down

Memory problem in version 1.3.1? Empty Memory problem in version 1.3.1?

Post  ludi Fri Dec 19, 2008 3:38 am

Hi everybody,

I just have a strange problem at my small application. I started with the tutorial 6_2 to change the code:
1) I removed the not necessary code
2) Add a specific move function

Everything seams to work fine. Afterwards I duplicated an selected object. I used exactly the same code as sio2interactive wrote in the forum.

The following occurs:
The first frame is okay, but at the second one the world moves about 1cm to the left.
Afterwards I changed my duplicate code as following:
Code:

bool DUPLICATE_OBJ = false;
if(DUPLICATE_OBJ) {
   NSLog(@"object DUPLICATE");
   SIO2object *_new=NULL;
}
The DUPLICATE_OBJ will never set to true!!! The program still moves the world to the left at the second frame. If I comment the line “//SIO2object *_new=NULL;” the program works fine!

Does anyone have an idea? Even if I add one variable at the beginning of the templateRender method (e.g int test;) the program does not work any more!

In my opinion there has to be a memory problem somewhere in the library!

Thanks a lot for your help.
ludi

ludi

Posts : 14
Join date : 2008-10-19

Back to top Go down

Memory problem in version 1.3.1? Empty Re: Memory problem in version 1.3.1?

Post  sio2interactive Fri Dec 19, 2008 4:18 am

Have you try to debug with Enable Malloc Guard and Instruments (Leaks)???
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Memory problem in version 1.3.1? Empty Re: Memory problem in version 1.3.1?

Post  ludi Fri Dec 19, 2008 7:40 am

sio2interactive wrote:Have you try to debug with Enable Malloc Guard and Instruments (Leaks)???

I just tried it with Instruments. There is one peak at the leaks row on exactly the same place as you have in Tutorial 6_1.

Afterwards I enabled Malloc Guard and start the debugger again.
Now the problem appears different. The first frame is still okay, but the second frame is empty!

If I define the variables global (e.g: SIO2object *_new=NULL;), the problem does not occur.

ludi

Posts : 14
Join date : 2008-10-19

Back to top Go down

Memory problem in version 1.3.1? Empty Re: Memory problem in version 1.3.1?

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum