강의

멘토링

커뮤니티

Inflearn Community Q&A

minco's profile image
minco

asked

Becoming a Successful Real iOS Developer [From Basics to Practice]

27. Closure_3

Capturing Valus

Written on

·

288

0

cloule 3번째 강의에서

// Capturing Valus

// reference Type(class, function, closure)

// value Type(Int, String, Array, Dictionary, struct)

라고 알려주셨는데 String은 reference type가아닌가요?

iosswift동시성

Answer 1

0

enilv0529님의 프로필 이미지
enilv0529
Instructor

안녕하세요

결론부터 말씀드리면 내부적으로 reference type처럼 동작하긴 하는데 String타입 자체는 value type으로 동작됩니다.

어떤 부분 때문에 reference type이라고 생각하시는지 더 질문주시면 추가 답변 드리도록 하겠습니다.

minco's profile image
minco

asked

Ask a question