Ask your own question, for FREE!
Computer Science 10 Online
OpenStudy (anonymous):

why should value working in stack and reference managed in heap? Ref---value contain null reference contain null

OpenStudy (shadowfiend):

Not sure what you're asking. Generally whether a value is allocated on the stack or heap is an implementation detail. Things allocated on the stack are generally faster to allocate than things allocated on the heap, though.

OpenStudy (llib_xoc):

One important difference is that stack-resident values have a lifetime only as long as the function/procedure is running, and they literally disappear (they "go out of scope") when the function exits. Heap-resident values can be useful for the entire running of a program of multiple functions.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!