Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Memory problem #3

Open
Ricardo1980 opened this issue Oct 29, 2015 · 2 comments
Open

Memory problem #3

Ricardo1980 opened this issue Oct 29, 2015 · 2 comments

Comments

@Ricardo1980
Copy link

Hello!
I found something strange. Sometimes my viewcontrollers are not released, then using the profiler I saw how in the vc lifecycle NSConcreteMapTable increments the retain count of my VC, but never decrements it.
Any idea?
If I do the segue in the common way, then everything works as expected (my vc is released). That is, in this case, if I save the hotspot in a instance variable and use it in prepareForSegue, everything works fine.

captura de pantalla 2015-10-29 a las 21 11 07
captura de pantalla 2015-10-29 a las 21 11 28
captura de pantalla 2015-10-29 a las 21 18 10

@Ricardo1980 Ricardo1980 changed the title Leak Memory problem Oct 29, 2015
@seivan
Copy link
Member

seivan commented Oct 30, 2015

Are you calling this somewhere?

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender; 

If you do have that, you also need this

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender; {
  if([self SH_handlesBlockForSegue:segue])  { return; }
}

I'll take look myself later on to see what is happening. Might be that I've broken the build with a strong reference somewhere. I'll add tests and fix it.

@Ricardo1980
Copy link
Author

Yes, see these screenshots.
Basically, I have a map, and when I press a callout (the pin name), then I open a view with the detail of that pin. Doing that is what causes the memory problem. If I save the selected pin in a variable and use the common way to pass parameters, avoiding this lib, then everything works fine.
Any idea?
screen shot 2015-10-30 at 15 50 04

screen shot 2015-10-30 at 15 50 16

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

No branches or pull requests

2 participants