.NET Memory Management

์ข‹์•„์š” 3

์ž˜ ์ •๋ฆฌ๋œ ๋‚ด์šฉ์ด๋„ค์š”. ์ œ๊ฐ€ ๋ดค๋˜ gc๊ด€๋ จ ์ธ๊ฐ•์ด ์žˆ๋Š”๋ฐ ์ด ์•„ํ‹ฐํด๊ณผ ๋‚ด์šฉ์ด ๋น„์Šทํ•œ๋ฐ ์ข€ ๋” ์ž์„ธํžˆ ๋‹ค๋ฃจ๊ณ  ์žˆ์–ด์„œ ์†Œ๊ฐœํ•ฉ๋‹ˆ๋‹ค.

https://www.udemy.com/share/10281iBEMZdVtVRHg=/

์ด ๊ฐ•์˜๋ฅผ ์™„๋…ํ•˜๊ณ  gc์— ๋Œ€ํ•œ ์ดํ•ด๊ฐ€ ๋งŽ์ด ๋†’์•„์กŒ์Šต๋‹ˆ๋‹ค.

๊ทธ๋Ÿฐ๋ฐ TestServer๋ผ๋Š” ํด๋ž˜์Šค๋Š” ์ฒ˜์Œ๋ด์„œ ์ฐพ์•„๋ณด๋‹ˆ msdn์— ์žˆ๋Š” ๋‹ท๋„ท api๋„ค์š”โ€ฆ ๋‚˜์ค‘์— ์ด๊ฒƒ๋„ ์•Œ์•„๋ณด๋Š” ๊ฒƒ์œผ๋กœ ใ…Žใ…Ž

๋˜ํ•œ httpclient์˜ ๊ฒฝ์šฐ dispose๋ฅผ ํ•ด๋„ ์†Œ์ผ“ ๋ฐ”์ธ๋”ฉ์ด ํ’€๋ฆฌ์ง€ ์•Š์•„ dispose๊ฐ€ ์˜๋ฏธ์—†๋‹ค๋Š” ๊ธ€์„ ๋ดค๋Š”๋ฐ, ๊ทธ์— ๋”ฐ๋ผ ๊ผญ httpclientfactory๋ฅผ ํ†ตํ•ด httpclienthandler๋ฅผ ๋ฏธ๋ฆฌ ์ •์˜ํ•ด๋‘๊ณ  ์ฐ์–ด๋‚ด๋Š” ๊ฒƒ์ด ์ข‹๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ํ˜น์‹œ ๋ชจ๋ฅด์‹œ๋Š” ๋ถ„๋“ค์„ ์œ„ํ•˜์—ฌ ๋งํฌ ๋‚จ๊น๋‹ˆ๋‹คโ€ฆ

์ข‹์•„์š” 2