Re: Stack And Heap
Paulus de Boska wrote On 02/01/06 15:37,:
> obj is not the object, it's just a 4-byte reference to the object. If
> the reference is local, the object it points to is still in the heap.
> You only need heaps of stack-space(sorry) if you use hefty local
> arrays, fe.
No, not even then. An array is an object, and resides
in the heap with all the other objects. Only the reference
to the array (perhaps four bytes, perhaps some other small
number) resides on the stack.
--
Eric.Sosman@xxxxxxx
.
Relevant Pages
- Re: Garbage collectable pinned arrays!
... reference to it anywhere on the call stack. ... But collecting the object and ... When the array is pinned it is copied to heap. ... (microsoft.public.dotnet.languages.csharp) - Re: Garbage collectable pinned arrays!
... to see is an option to allocate the array on the heap initially. ... by putting GC.KeepAliveafter the unmanaged code call. ... The reason for this is that the JIt doesn't know about unmanaged code, as a result he *marks* the reference "ia" as a candidate for collection (signals the GC that the object ia refers to may be collected at the moment of the call. ... (microsoft.public.dotnet.languages.csharp) - Re: Garbage collectable pinned arrays!
... reference to it anywhere on the call stack. ... But collecting the object and ... When the array is pinned it is copied to heap. ... (microsoft.public.dotnet.languages.csharp) - Re: VB-101: Passing Arrays ByVal vs ByRef
... changed if an array is passed by Val. ... ' new reference ... As each function creates a new array object, ... 'secondArray' and 'secondArrayCopy'. ... (microsoft.public.dotnet.languages.vb) - Re: Need help with textboxes
... The JavaScript 1.5 Reference already states: ... All forms and their children are stored in an array ... use dot notation or object literals. ... No. Bracket property accessors allow their argument to be any string value. ... (comp.lang.javascript) |
|