Passing Arrray from DAL

G

Guest

Hi,
VS 2005/.NET 2.0
In my DAL i am running a query and passing the results into a local array.
That array is being passed back to the BAL and through to the Presentaltion
layer.
Now, i would have though that there would be a problem accesssing the array
in the presentation layer, but it appears to work. Is this functionality
guarenteed or not?
My understanding is that when the function is called in the DAL it creates
the array in memory, and passes back a reference to that memory through the
array name. But, at the point where the function call ends, i would expect
that memory to be cleaned up and the reference to the array to no longer be a
valid reference (essentially a dangling pointer). By passing the array
through the layers am i using a non guarented functionality, and it works
only because the garbage collection has not been performed, or is there a
mechanism in .NET that guarentee's the pointer is valid?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,780
Messages
2,569,607
Members
45,240
Latest member
pashute

Latest Threads

Top