Assigning a Variable to an Underscore in Swift
|Added at||2017-01-01 06:01|
After researching stackoverflow about underscores in Swift I understand that an underscore means a) ignore this function and b) you can omit the parameter name when using the method. What I don't understand is what happens if we assign a variable to an underscore? By assigning an underscore to a variable, this silences the compiler warning from Xcode that reads "result of initializer is unused" but it doesn't show warnings if you don't use this variable in any way.
Is this variable still created and stored in memory or is it ignored by the compiler all together as if it were a line of code that is commented out?
Is the following line of code created and stored in memory or ignored:
Hopefully this question makes sense because I'd like to become mindful of how each piece of memory is used in Xcode.