Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7399617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:05:00+00:00 2026-05-29T04:05:00+00:00

I am building an application where I am using CorePlot libraries to show graphs.

  • 0

I am building an application where I am using CorePlot libraries to show graphs.

I have a tableView and when a cell is tapped it shows the relevant chart in a detailed view controller.

Now While testing my app in instrument i found that when the chart loads there is an increase in memory allocation.
In my detailViewController I am releasing everything that I am retaining.

I have CPXYGraph *graph defined in my .h file

and in a function in .m I am adding a plot to my graph object
i.e.

    CPScatterPlot *boundLinePlot2 = [[[CPScatterPlot alloc] init] autorelease];
    boundLinePlot2.identifier = @"My Plot2";
boundLinePlot2.dataLineStyle.miterLimit = 1.0f;
boundLinePlot2.dataLineStyle.lineWidth = 1.0f;
boundLinePlot2.dataLineStyle.lineColor = [CPColor yellowColor];
    boundLinePlot2.dataSource = self;
   // Add plot symbols

CPLineStyle *symbolLineStyle2 = [CPLineStyle lineStyle];
symbolLineStyle2.lineColor = [CPColor yellowColor];
symbolLineStyle2.lineWidth = 1.0f;
CPPlotSymbol *plotSymbol2 = [CPPlotSymbol ellipsePlotSymbol];
plotSymbol2.fill = [CPFill fillWithColor:[CPColor yellowColor]];
plotSymbol2.lineStyle = symbolLineStyle2;
    plotSymbol2.size = CGSizeMake(0.2, 0.2);
    boundLinePlot2.plotSymbol = plotSymbol2;

// Set plot delegate, to know when symbols have been touched
// We will display an annotation when a symbol is touched
    boundLinePlot2.delegate = self; 
    boundLinePlot2.plotSymbolMarginForHitDetectionX = 25.0f;
boundLinePlot2.plotSymbolMarginForHitDetectionY = 400.0f;

[graph addPlot:boundLinePlot2];

Now My question is if I do something like [graph removePlot:boundLinePlot2] when going back to my mainViewController, does it will make any difference in my memory allocation problem and if not then when we should be using removePlot property

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T04:05:00+00:00Added an answer on May 29, 2026 at 4:05 am

    Each plot caches its own data after loading it from the datasource, so that’s probably most of the allocation increase you’re seeing.

    Remove the graph from its hosting view and release it to reclaim the memory when you’re done with it. The -removePlot: method only removes the given plot from the graph. That will free up some memory as long as you don’t retain the plot somewhere else.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a web application using Stripes and Spring. It needs to have a
I'm building a web application using PHP5.3 and Zend Framework 1.9.4. i have an
I am building a WPF application using C# 3.5 I have a WPF menu
I am building an application using Raphaël. I have done my work on vectors,
I have application building using third party apis, j2me apis,application code distributed in various
I'm currently building an application using Sencha Touch. We have a certain Carousel on
I'm building an application using Visual Studio 2010 in which I have to use
I am building an application using Delphi 7. I have added one button on
I am building an application using cakePHP. Do we have a method where we
Unlike this question: Linker Error while building application using Boost Asio in Visual Studio

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.