hungio / route-me

Automatically exported from code.google.com/p/route-me
0 stars 0 forks source link

Modifying layer that is being finalized #134

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
RMPath's dealloc method calls:

[self setLineColor:nil];
[self setFillColor:nil];

both of them call:

[self setNeedsDisplay];

This results in the message above being logged twice for the path. A
solution would be to call setNeedsDisplay only if the set color is not nil.

Original issue reported on code.google.com by andrei.g...@gmail.com on 16 Feb 2010 at 12:18

GoogleCodeExporter commented 8 years ago
This appears to be a common issue around the library. 

Using setters in dealloc methods is generaly wrong: when using dynamic setter 
you'll 
trigger changes in an object that is being torn down leads to crashes. 

Original comment by pawel.b.dudek on 17 Mar 2010 at 4:39