Getting Started with Adobe After Effects - Part 6: Motion Blur
This module helps you to share, discuss and learn interview questions and answers of different technologies

Write a C# statement where both heap and stack memory allocation is required.

Jan 28 2012 11:31PM by Manas Ranjan Dash   

Question

Write a C# statement where both heap and stack memory allocation is required.

Answer

MyClass objMyClass= new MyClass();

A pointer called objMyClass is allocated on stack and once the compiler get to know about the new keyword it allocates the meomry on heap. So the object or the variable from stack keep the reference to the heap area.

Read this article on MSDN on "Heap: Pleasures and Pains"

Read More..   [118 clicks]

Published under: C# Interview Questions and Answers ·  ·  ·  · 


Manas Ranjan Dash
39 · 5% · 1484
0
Liked
 
0
Asked



Submit

Your Comment


Sign Up or Login to post a comment.

"Write a C# statement where both heap and stack memory allocation is required." rated 5 out of 5 by 4 readers
Write a C# statement where both heap and stack memory allocation is required. , 5.0 out of 5 based on 4 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]