A short article about one of the many features Spring4D 1.2 will contain.

A short article about one of the many features Spring4D 1.2 will contain.
http://delphisorcery.blogspot.com/2015/01/smart-pointers-in-delphi.html

Comments

  1. Well done, Stefan. i guess this feature can be used without too much dependency of the entire spring4d?

    ReplyDelete
  2. Edwin Yip Yes, it's defined in Spring.pas which has just a dependency on 3 other Spring.Base units. Just as most basic types defined in Spring4D. It's one of our goals to not pull in the entire library for basic functionalities.

    ReplyDelete
  3. Edwin Yip That works but is only the solution to a part of the problem that smart pointers solve. It would solve what I showed in my examples but in fact you can pass a smart pointer around, keep them and then at the end somewhere they destroy the instance when they run out of scope.

    ReplyDelete
  4. Stefan Glienke Thanks for the explanation, so basically it's like the reference-counted interface instances, right?

    ReplyDelete
  5. Not only like, it is an interface, so it is reference counted, yes.

    ReplyDelete

Post a Comment