Slices - clarification

BlitzMax Forums/BlitzMax Beginners Area/Slices - clarification

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

So, if you do this:
Local a%[] = [11,12,13,14,15]
Local Count% = 10

a = a[..Count]


Then BMax reads the original array (which is an object), creates a new empty array (new object of type Array) with size "Count" (= 0 <-> Count-1), copy all existing indexes from the original array to this new array, and put the pointer to this new array inside "a".
So that "a" points to the new array-object, while the original still exists in memory, but has no more reference to it.
At the next FlushMem, the original array will be deleted from memory.

Is all this correct?
If so, then I'm beginning to understand objects, I think.

Then this would be correct too:
Local a%[] = [11,12,13,14,15]
Local b[]
Local Count% = 10

b = a[..Count]


BMax creates an array object and puts it's pointer inside "a".
That array object would hold all values stated on the first line.
It also creates an empty array object and puts it's pointer inside "b".

Then on the line "b = a[..Count]", BMax would create again a new array object with size Count (= 0 <-> Count-1), copies all indexes from array "a" to this newly created array and puts the pointer of this new array object inside b, overwriting the pointer to the empty array object.

So after that line, "a" will still hold the pointer to it's array object that was created at the first line, "b" will hold the pointer to the newly created array object (created by using slices) and the empty array object (which was declared at the second line) is no longer referenced (but still exists in memory) and can be removed from memory with FlushMem.

Is this also correct?