473,387 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

managed c++ .net i neeed guy's

i was wondering if you make a managed class and make a
variable __nogc is it but on the stack.

__gc class a

{

int a __nogc[34]; is this but on the stack or the heap?

};
Nov 16 '05 #1
2 906
i have tried to deduce the answer 3 times, but i could not tell you for
sure.
i suggest you write a little test case, and use the watch windows to see
where it is allocated.

my guess is that it is on the unmanaged heap if your array is a member
variable of your gc class, because the object can still exist after the
function that created it has returned (thereby invalidating the variables
that were created on the stack.).

if you allocate the array as a local variable in a method call, i guess it
is allocated on the stack, since it will not be referenced anymore after the
method returns.

anyone please correct me if i am wrong.

kind regards,
Bruno.
"christopher" <kh****@msn.com> wrote in message
news:23*****************************@phx.gbl...
i was wondering if you make a managed class and make a
variable __nogc is it but on the stack.

__gc class a

{

int a __nogc[34]; is this but on the stack or the heap?

};

Nov 16 '05 #2
Always on the GC heap. Laid out inline in the instances of class a.

Ronald

"christopher" <kh****@msn.com> wrote in message
news:23*****************************@phx.gbl...
i was wondering if you make a managed class and make a
variable __nogc is it but on the stack.

__gc class a

{

int a __nogc[34]; is this but on the stack or the heap?

};

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: bonk | last post by:
Hello, I am trying to create a dll that internally uses managed types but exposes a plain unmanaged interface. All the managed stuff shall be "wrapped out of sight". So that I would be able to...
87
by: Robert Seacord | last post by:
The SEI has published CMU/SEI-2006-TR-006 "Specifications for Managed Strings" and released a "proof-of-concept" implementation of the managed string library. The specification, source code for...
1
by: rm | last post by:
pgp trash troll delete Guy Macon Guy Macon guymacon Guy Macon Guy Macon guymacon Guy Macon Guy Macon guymacon Guy Macon Guy Macon Guy Macon guymacon Guy Macon Guy Macon guymacon Guy Macon Guy...
5
Plater
by: Plater | last post by:
The biggest problem is that my higher-up is a stubborn guy and won't use anything other then MFC. I have a DLL that I wrote in C# that performs some socket operations. Is there anyway to use this...
4
by: Andy | last post by:
Hi all, sorry for the cross group spam but my question does really fall into both groups. Here's my issue. I have a Visual C++, CLR Class Library with a public class and a public method in a...
5
by: =?Utf-8?B?Z3V5?= | last post by:
Just out of interest, how much of Vista, Office 2K8, Visual Studio 2K8 is written in managed code? guy
0
by: guy.tzur | last post by:
Hi All, I was wondering if there is an option to invoke managed code from unmanaged code (c/c++) without the need to expose the .NET code as COM. What I'm looking for is an in-process option to...
6
by: Guy Macon | last post by:
While I agree with the sentiment, the oringinal title on this thread ("OT: Specially for , why you should always use example.com for obfuscating domains") is wrong. There are other reserved domain...
6
by: Guy Macon | last post by:
cwdjrxyz wrote: HTML 5 has solved the above probem. See the following web page: HTML 5, one vocabulary, two serializations http://www.w3.org/QA/2008/01/html5-is-html-and-xml.html
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.