gujjula / core-plot

Automatically exported from code.google.com/p/core-plot
0 stars 0 forks source link

CPXYGraph alloc ] initWithFrame:frame] gives a retain count of 2 at the very next line #224

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.graph = [CPXYGraph alloc] initWithFram:fram];
2.retain count at this line for graph is 2
3.if you do coreChart = [CPLayerHostingView] alloc] init]
4. coreChart.hostedlayer = graph 
5. graph retain count is 4 at this time.

What is the expected output? What do you see instead?
retain count should be 1 and 2 in order above.

What version of the product are you using? On what operating system?
i am using alpha release 0.2, on iPad 3.2 for Xcode latest 

Please provide any additional information below.

Original issue reported on code.google.com by neerajgo...@gmail.com on 18 Nov 2010 at 1:34

GoogleCodeExporter commented 9 years ago
There is nothing in the initializers to suggest a problem with memory 
management.
As a rule, Apple advise you not to look at the retainCount, because it can be 
affected by many different things. For example, perhaps the layers are being 
retained somewhere in the Core Animation framework for some reason. In any 
case, I don't think this is an issue, and unless you can trace a memory leak to 
it, we probably should close the issue.

Original comment by drewmcco...@mac.com on 18 Nov 2010 at 8:39

GoogleCodeExporter commented 9 years ago
memory leak ... can be traced if you look at allocations in instruments, where 
a chartController is a sub view is another view controller and some button 
click you try to release and create a chart view, the view stays stays on even 
after releasing it or removing it from the superview, these is keeping the 
older CPXYGraph alive, as you keep on allocating 

Original comment by neerajgo...@gmail.com on 18 Nov 2010 at 7:59

GoogleCodeExporter commented 9 years ago
Are you releasing the CPXYGraph or the CPLayerHostingView?

Original comment by eskr...@mac.com on 18 Nov 2010 at 11:11

GoogleCodeExporter commented 9 years ago

Original comment by drewmcco...@mac.com on 8 Jan 2011 at 10:07