Blog post "Weak and Unsafe Interface References in Delphi 10.1 Berlin" at http://blog.marcocantu.com/blog/2016-april-weak-unsafe-interface-references.html
Blog post "Weak and Unsafe Interface References in Delphi 10.1 Berlin" at http://blog.marcocantu.com/blog/2016-april-weak-unsafe-interface-references.html
http://blog.marcocantu.com/blog/2016-april-weak-unsafe-interface-references.html
http://blog.marcocantu.com/blog/2016-april-weak-unsafe-interface-references.html
IMHO weak references are the most important feature for the Windows compilers since generics have been introduced.
ReplyDeleteSo cool you've implemented both unsafe and weak!
ReplyDeleteWhen should I choose unsafe instead of weak? Whent is it better to have a dangling pointer instead of nil?
ReplyDeleteUnsafe can be used if you are predictable memory management and memory release. So you know if a reference is valid by design. Or for short-lived temporaries. Weak in all other cases of multiple independent references.
ReplyDelete