View
11
Download
0
Category
Preview:
DESCRIPTION
Stack. Heap. str. bira. String @42e816. anotherStr. String @42e816. bi. bi. String @3ecfff. ra. ra. String @ 9ae764. thirdString. bira. String @ 7cdaf2. Stack. Heap. hello. Hello. string @ a8fe24. same. string @ a8fe24. Stack. Heap. str1. Hello. String @ 6e278a. str2. - PowerPoint PPT Presentation
Citation preview
HeapStack
String@42e816
str
bira
String@42e816
anotherStr
String@3ecfff
bi
bi
String@9ae764
ra
ra
String@7cdaf2
thirdString
bira
HeapStack
string@a8fe24
hello
Hello
string@a8fe24
same
HeapStack
String@6e278a
str1
Hello
String@6e278a
str2
HeapStack
string@6e278a
hel
Hel
string@2fa8fc
hello
Hello
string@a7b46e
copy
Hello
HeapStack
string@6e278a
declared
Intern pool
string@6e278a
interned
string@a7b46e
built
Intern pool
HeapStack
String@6e278a
str1
Hello
String@821a48
str2
Hello
HeapStack
string@821a48
str
C # P r o g r a m m i n g C o u r s e
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 21
HeapStack
Cat@6e278a
someCat
(Cat members)
HeapStack
Cat@6e278a
someCat name:String@a272e8
color:String@852fa4
Johny
brown
HeapStack
Cat@6e278a
someCat name:String@a272e8
color:String@852fa4
Johny
brown
String@7cdaf2
Integer@9ae764
HeapStack
42
i
ch
result
obj
42
str
Hello
(4 bytes)
A (2 bytes)
true (1 byte)
Integer(4 bytes)
String
[B@190d11
bytes
1 byte[]2 3
String@9a787b
null
HeapStack
0
i
ch
result
obj
42
str
Hello
(4 bytes)
B (2 bytes)
false (1 byte)
Integer(4 bytes)
String
[B@190d11
bytes
1 byte[]0 3
Bye String
H e l l o , C # !StringBuilder:
Length=9Capacity=15
Capacity
използван буфер(Length)
неизползван буфер
Recommended