Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't 'nil' a variable xcode
    primarykey
    data
    text
    <p>Trying to 'nil' some double variables... but getting the 'Assigning to 'double' from incompatible type 'void *' error...</p> <p>This is my properties (trying to make a variable type class, that holds global vars so they can be accessed and changed from anywhere in the app):</p> <pre><code>@property (nonatomic) CGPoint lastP; @property (nonatomic) double brushR; @property (nonatomic) double brushG; @property (nonatomic) double brushB; @property (nonatomic) double brushW; @property (nonatomic) double brushO; @property (nonatomic) BOOL mouseSwiped; </code></pre> <p>then I synthesis like so: @Synthesis lastP; @Synthesis brushR; etc, etc,</p> <p>and when I do a cleanup method (as I'm exiting the view and going back to a menu) and try and nil the vars so they can be deallocated via arc brushR = nil; brushG = nil; lastP = nil; etc, etc I get the error I stated above.</p> <p>Is it easier to just use [view removefromsuperview] in the parent viewcontroller (as all this information is going into a containerView INSIDE of a view controller (that's the way it needs to be, can't get around this)) and will that kill all the variables from the above calss? or do I need to nil them manually? </p> <p>if I can just use removefromsuperview (from a parent class) (eg, I have a view controller and then a container view inside that controller, when a button is pushed in the PARENT controller, the app uses [childcontroller removefromsuperview]) will that 'kill' ALL objects being used by the childview (as I have a uiImage inside the childview view and it didn't seem to clear the image it was holding from memory when I tried this method).</p> <p>if I have to nil my vars (and not just nuke the view and remove it from the hirachy) why isn't it letting me do this?</p> <p>I really hope I'm understandable.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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