block을 callback으로 쓰기 위해서 video로 다시 배워본다.

WWDC 2010 Session Videos - HD
Session 206 - Introducing Blocks and Grand Central Dispatch on iPhone 49:52 10. 6. 16. Apple Developer Developer on iTunes

이 때 말하기로는 blocks가 c++, objective c++ 에서 아직은 덜 지원되고 있다고 하네. 지금은 어떤지 모르겠다.

lambda calculus 가능.
block은 objective c object.

automatic reference counting이 잘 되려나 모르겠네. 

[block copy]  는 다시 봐도 어렵다.
objective c garbage collection session에서 더 자세히 가르쳐준다. 

18' 부터는 grand central dispatch 설명. 

twitter 내용 list에서 image를 비동기로 update하는 걸 dispatch_async( , ^{ }) 를 통해서 쉽게 처리할 수 있다.
이거 알아둬야겠다. 

WWDC 2011 Session Videos - HD
Session 308 - Blocks and Grand Central Dispatch in Practice 45:03 11. 6. 16. Apple Developer Developer on iTunes
는 지난 번에 봤었는데, 이해를 잘 못했었다.


다시 보니, 좀 낫다.
function과 block을 바로 옆에 두고 비교해가면서 설명해주니 좋다.
__block int cnt = 0; 도 block 안으로 쉽게 넘길 수 있다. 대신 memory management에는 신경써야 한다.

12' 부터는 또 grand central dispatch
중간에 dispatch_apply, dispatch_async 를 설명하는 부분은 집중하지 않았다. 나중에 필요할 때 봐야지.

34' 부터 다시 block memory management
Block_copy() 못알아듣겠다.
[obj setHandler: ^{ [obj doSomething]; }]; 라고 쓰면 retain cycle이 생기니까
__block NSThingy *tmp = obj;
[obj setHandler: ^[tmp doSomething]; }];
로 바꿔 쓰래. 어려워 -0-; Block_copy 를 안쓸 꺼면 신경쓰지 않아도 되나?

related sessions가
simplifying iphone app development with grand central dispatch
working effectively with objective-c on iphone os
advanced objective-c and garbage collection techniques
라는데, wwdc2010 에서 찾을 수가 없다.

block 포함 gcd 관련 list

WWDC 2010 Session Videos - HD
Session 206 - Introducing Blocks and Grand Central Dispatch on iPhone 49:52 10. 6. 16. Apple Developer Developer on iTunes
Session 211 - Simplifying iPhone App Development with Grand Central Dispatch 54:03 10. 6. 16. Apple Developer Developer on iTunes

WWDC 2011 Session Videos - HD
Session 308 - Blocks and Grand Central Dispatch in Practice 45:03 11. 6. 16. Apple Developer Developer on iTunes
Session 210 - Mastering Grand Central Dispatch 42:48 11. 6. 16. Apple Developer Developer on iTunes

 
by 언제나19 2011. 11. 12. 18:43
| 1 |