diff --git a/Doc/Sd1/Ref/ObjectsAndClasses/ValueReference/callByValueNewReference.multi.svg b/Doc/Sd1/Ref/ObjectsAndClasses/ValueReference/callByValueNewReference.multi.svg index 1bcc21bb8d38608b0bbd5a54fcea45f3480a08ff..f312fbd2865cef794293f74c86e2369e006d5cdb 100644 --- a/Doc/Sd1/Ref/ObjectsAndClasses/ValueReference/callByValueNewReference.multi.svg +++ b/Doc/Sd1/Ref/ObjectsAndClasses/ValueReference/callByValueNewReference.multi.svg @@ -2,7 +2,7 @@ <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg - xmlns:ns1="https://launchpad.net/jessyink" + xmlns:jessyink="https://launchpad.net/jessyink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" @@ -15,7 +15,7 @@ viewBox="0 0 170.00002 75" version="1.1" id="svg8" - inkscape:version="0.92.3 (2405546, 2018-03-11)" + inkscape:version="0.92.4 (unknown)" sodipodi:docname="callByValueNewReference.multi.svg"> <sodipodi:namedview id="base" @@ -25,14 +25,14 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1.8200176" - inkscape:cx="261.65563" + inkscape:cx="326.49017" inkscape:cy="165.0819" inkscape:document-units="mm" inkscape:current-layer="g5795" showgrid="true" - inkscape:window-width="1461" - inkscape:window-height="1038" - inkscape:window-x="67" + inkscape:window-width="1600" + inkscape:window-height="1145" + inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" fit-margin-top="0" @@ -752,6 +752,66 @@ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1" id="path14882" /> </marker> + <marker + inkscape:stockid="DotM" + orient="auto" + refY="0" + refX="0" + id="marker6428-3" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path6426-6" + d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(0.4,0,0,0.4,2.96,0.4)" /> + </marker> + <marker + inkscape:stockid="Arrow2Mend" + orient="auto" + refY="0" + refX="0" + id="marker6624-7" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path6622-5" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" + transform="scale(-0.6)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DotM" + orient="auto" + refY="0" + refX="0" + id="marker6428-3-5" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path6426-6-6" + d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(0.4,0,0,0.4,2.96,0.4)" /> + </marker> + <marker + inkscape:stockid="Arrow2Mend" + orient="auto" + refY="0" + refX="0" + id="marker6624-7-2" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path6622-5-9" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" + transform="scale(-0.6)" + inkscape:connector-curvature="0" /> + </marker> </defs> <metadata id="metadata5"> @@ -788,40 +848,45 @@ <rect style="display:inline;fill:#00ffff;stroke:none;stroke-width:0.79412645;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect5745" - width="66.91597" - height="10.248935" - x="9.2604036" - y="31.737488" /> + width="54.239582" + height="10.583332" + x="6.614573" + y="21.313824" /> <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.26458332" - x="89.542847" - y="37.759331" + x="88.381157" + y="32.467663" id="text5751"><tspan - id="tspan5749" sodipodi:role="line" - x="89.542847" + x="88.381157" + y="32.467663" + style="fill:#ff0000;stroke-width:0.26458332" + id="tspan1218">Print original instance. Result:</tspan><tspan + sodipodi:role="line" + x="88.381157" y="37.759331" - style="fill:#ff0000;stroke-width:0.26458332">Print original <tspan - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono'" - id="tspan1628">StringBuffer</tspan> instance.</tspan><tspan + style="fill:#ff0000;stroke-width:0.26458332" + id="tspan1224"><tspan + style="fill:#008000" + id="tspan1220">"After: My"</tspan></tspan><tspan sodipodi:role="line" - x="89.542847" - y="43.050999" + x="88.381157" + y="43.050995" style="fill:#ff0000;stroke-width:0.26458332" id="tspan5809">Reference to second instance died</tspan><tspan sodipodi:role="line" - x="89.542847" + x="88.381157" y="48.342663" style="fill:#ff0000;stroke-width:0.26458332" id="tspan6951">along with its defining stack frame</tspan><tspan sodipodi:role="line" - x="89.542847" - y="53.634331" + x="88.381157" + y="53.634327" style="fill:#ff0000;stroke-width:0.26458332" id="tspan1626">leaving an orphaned heap instance</tspan><tspan sodipodi:role="line" - x="89.542847" + x="88.381157" y="58.925995" style="fill:#ff0000;stroke-width:0.26458332" id="tspan1630">behind.</tspan></text> @@ -942,8 +1007,8 @@ id="rect5376" style="display:inline;fill:#00ff00;stroke:none;stroke-width:0.26609951;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> <rect - y="51.508358" - x="4.1723118" + y="46.73999" + x="4.0703354" height="6.3238354" width="13.127571" id="rect5378" @@ -958,26 +1023,31 @@ y="37.759331" x="89.542847" sodipodi:role="line" - id="tspan5467">Replacing StringBuffer reference</tspan><tspan + id="tspan1231">Changing reference to new heap</tspan><tspan style="fill:#ff0000;stroke-width:0.26458332" y="43.050999" x="89.542847" sodipodi:role="line" - id="tspan5471">by new heap instance.</tspan><tspan + id="tspan1235">instance.</tspan><tspan style="fill:#ff0000;stroke-width:0.26458332" y="48.342663" x="89.542847" sodipodi:role="line" - id="tspan5805">Return to main(...) thereby releasing</tspan><tspan + id="tspan5805"></tspan><tspan style="fill:#ff0000;stroke-width:0.26458332" y="53.634331" x="89.542847" sodipodi:role="line" - id="tspan1612">stack frame.</tspan><tspan + id="tspan1237">Return to main(...) thereby releasing</tspan><tspan style="fill:#ff0000;stroke-width:0.26458332" y="58.925995" x="89.542847" sodipodi:role="line" + id="tspan1612">stack frame.</tspan><tspan + style="fill:#ff0000;stroke-width:0.26458332" + y="64.217659" + x="89.542847" + sodipodi:role="line" id="tspan5803" /></text> <text id="text5388" @@ -1059,12 +1129,6 @@ x="108.08022" id="tspan5410" sodipodi:role="line">b</tspan></text> - <path - sodipodi:nodetypes="csc" - inkscape:connector-curvature="0" - id="path5414" - d="m 115.09373,18.66799 c 8.9406,0.0033 15.15814,0.403573 21.28168,-2.721387 5.14734,-2.626787 10.46833,-6.5390301 13.11416,-13.1536135" - style="display:inline;fill:none;stroke:#000000;stroke-width:0.52916676;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#marker6428-1);marker-end:url(#marker6624-2)" /> <path sodipodi:nodetypes="cc" inkscape:connector-curvature="0" @@ -1113,6 +1177,18 @@ y="51.863682" style="stroke-width:0.26458332" id="tspan5801" /></text> + <path + sodipodi:nodetypes="cc" + inkscape:connector-curvature="0" + id="path5400-3" + d="M 113.77083,18.66799 149.48957,1.4700729" + style="display:inline;fill:none;stroke:#000000;stroke-width:0.52916676;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#marker6428-3);marker-end:url(#marker6624-7)" /> + <path + sodipodi:nodetypes="cc" + inkscape:connector-curvature="0" + id="path5400-3-1" + d="m 113.77083,18.66799 h 34.39583" + style="display:inline;fill:none;stroke:#000000;stroke-width:0.52899998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58699992, 0.52899997;stroke-dashoffset:0;stroke-opacity:1;marker-start:url(#marker6428-3-5);marker-end:url(#marker6624-7-2)" /> </g> <g transform="translate(-1.4239073,11.675749)" @@ -1130,10 +1206,10 @@ <rect style="display:inline;fill:#00ff00;stroke:none;stroke-width:0.6052888;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect6380" - width="40.603268" - height="9.8128128" - x="16.674482" - y="53.107475" /> + width="43.2491" + height="9.8128119" + x="16.282141" + y="47.219761" /> <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.26458332" @@ -1144,12 +1220,7 @@ x="89.542847" y="37.759331" style="fill:#ff0000;stroke-width:0.26458332" - id="tspan9663">Creating second StringBuffer instance</tspan><tspan - sodipodi:role="line" - x="89.542847" - y="43.050999" - style="fill:#ff0000;stroke-width:0.26458332" - id="tspan5374">on heap.</tspan></text> + id="tspan5374">Creating second instance on heap.</tspan></text> <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" @@ -1279,10 +1350,10 @@ id="rect6339" style="display:inline;fill:#00ff00;stroke:none;stroke-width:0.26609951;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> <rect - y="19.990906" - x="6.614573" - height="5.887713" - width="60.854168" + y="14.69924" + x="5.2916551" + height="5.2916665" + width="58.208336" id="rect6341" style="display:inline;fill:#ff00ff;stroke:none;stroke-width:0.57398939;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> <text @@ -1361,8 +1432,8 @@ <rect style="display:inline;fill:#00ffff;stroke:none;stroke-width:0.9404847;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect6076" - width="63.5" - height="15.148129" + width="56.885418" + height="9.260417" x="6.614573" y="5.4388227" /> <text @@ -1386,8 +1457,8 @@ y="48.342663" style="fill:#ff0000;stroke-width:0.26458332" id="tspan6335">Result: <tspan - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono'" - id="tspan6337">"My"</tspan></tspan></text> + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#008000" + id="tspan6337">"Before: My"</tspan></tspan></text> <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" @@ -1540,7 +1611,7 @@ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';stroke-width:0.26458332">main(...)</tspan></text> </g> <g - ns1:masterSlide="masterSlide" + jessyink:masterSlide="masterSlide" transform="translate(-14.010514,-21.232287)" inkscape:label="Master" inkscape:groupmode="layer" @@ -1615,52 +1686,52 @@ x="13.909513" y="46.854866" style="stroke-width:0.26458332" - id="tspan10810"> "Before duplicateString: "+</tspan><tspan + id="tspan10812"> "Before: " + buffer);</tspan><tspan sodipodi:role="line" x="13.909513" y="52.14653" style="stroke-width:0.26458332" - id="tspan10812"> buffer);</tspan><tspan + id="tspan10792"> replaceString(buffer);</tspan><tspan sodipodi:role="line" x="13.909513" y="57.438198" style="stroke-width:0.26458332" - id="tspan10792"> replaceString(buffer);</tspan><tspan + id="tspan10794"> ...println(</tspan><tspan sodipodi:role="line" x="13.909513" y="62.729866" style="stroke-width:0.26458332" - id="tspan10794"> ...println(</tspan><tspan + id="tspan10816"> "After: " + buffer);</tspan><tspan sodipodi:role="line" x="13.909513" y="68.02153" style="stroke-width:0.26458332" - id="tspan10814"> "After duplicateString: "+</tspan><tspan + id="tspan10798">}</tspan><tspan sodipodi:role="line" x="13.909513" y="73.313194" style="stroke-width:0.26458332" - id="tspan10816"> buffer);</tspan><tspan + id="tspan10820"></tspan><tspan sodipodi:role="line" x="13.909513" y="78.604866" style="stroke-width:0.26458332" - id="tspan10798">}... replaceString(</tspan><tspan + id="tspan1276">replaceString(StringBuffer b){</tspan><tspan sodipodi:role="line" x="13.909513" y="83.89653" style="stroke-width:0.26458332" - id="tspan10820"> StringBuffer b) {</tspan><tspan + id="tspan10802"> b = new StringBuffer(</tspan><tspan sodipodi:role="line" x="13.909513" y="89.188194" style="stroke-width:0.26458332" - id="tspan10802"> b = new StringBuffer(</tspan><tspan + id="tspan10824"> "Replacement");</tspan><tspan sodipodi:role="line" x="13.909513" y="94.479866" style="stroke-width:0.26458332" - id="tspan10824"> "Replacement");}</tspan><tspan + id="tspan1274">}</tspan><tspan sodipodi:role="line" x="13.909513" y="99.77153"