Skip to main content

Posts

Showing posts from July 23, 2017

"Swift" from Programming Template

About Memory: 1. How do I get memory, i.e how are variables declared. Any specific facts and constrains about variables ? If type annotation like var Varb:Float ; is not used then it is mandatory to assign the initial value to the variable. "Var" keyword should get you the required memory. 2. How do we get the entry point for the program execution ? [ Example : main() in the C program ] Script based. There is no particular entry point. 3. How does dynamic memory handled ? Is it supported in first place ? Instances for the classes can be created. Automatic Reference counting mechanism has the strong reference to one of the variable. Till there is strong reference to the variable it'll be there in the memory. Once there is no strong reference it'll be de-initialized. [ Ref : https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/AutomaticReferenceCounting.html ] 4. What are the datatypes which are supported an