Note that there are some explanatory texts on larger screens.

plurals
  1. PODeallocated instance | "Malloc_history cannot examine process XYZ because the process does not exist."
    text
    copied!<p>I have memory problem (yes ;) I am new to iOS) with the following method in a custom UIView:</p> <p>Header file</p> <pre><code>.... @property (nonatomic, retain) NSString * pressureTextLabel; .... </code></pre> <p>Implementation draws a circle and a label with the pressure associated to the touch. Every finger touch creates a object of this view:</p> <pre><code>- (void)drawRect:(CGRect)theRect{ CGRect rect = self.bounds; CGRect ringRect = CGRectInset(rect, 100, 100); // Outer ring. UIBezierPath *path = [UIBezierPath bezierPathWithOvalInRect:ringRect]; ringRect = CGRectInset(rect, 60, 60); [path appendPath:[UIBezierPath bezierPathWithOvalInRect:ringRect]]; path.usesEvenOddFillRule = YES; [self.color set]; [path fill]; //text label rect = CGRectMake(100, 20, 100, 100); //This one seems to be the troublemaker [pressureTextLabel drawInRect:rect withFont:[UIFont systemFontOfSize:14.0]]; } </code></pre> <p>all works fine as long as this following method is not called by the controller to update the sensed pressure for this particular touch.</p> <pre><code>-(void) setTouchPressureTo: (float) pressure{ pressureTextLabel = [NSString stringWithFormat:@"%f", pressure]; [self setNeedsDisplay]; } </code></pre> <p>I get the following error:</p> <pre><code>*** -[CFString drawInRect:withFont:]: message sent to deallocated instance 0x16e8c0 </code></pre> <p>which made me investigate the memory trace in the debug console once the application crashed: <code>shell malloc_history &lt;PID&gt; 0x17dfb0</code> . As result the console returns:</p> <p><code>malloc_history cannot examine process 5838 because the process does not</code> exist.</p> <p><strong>So here the question:</strong></p> <ol> <li>Can someone see the obvious retain, release problem here? </li> <li>How can I get <code>malloc_history &lt;PID&gt; &lt;Address</code>> working?</li> </ol> <p>Thank you for your time, redirects and answers!</p> <p>Christian </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload