Lifetimestrategy(Manual)

In the docs you show string variable declaration: var s : lifetimestrategy(manual) String := …; But how to initialize this string variable? Any variants lead to compilation error.

      var s2 : lifetimestrategy(Manual) String := Manual<String>('hello');
      var s3 : lifetimestrategy(Manual) String := new Manual<String>('hello');

      var s4 : Manual<String> := 'hello';
      var s5 : Manual<String> := Manual<String>('hello');
      var s6 : Manual<String> := new Manual<String>('hello');

E: Type mismatch, cannot assign “String” to “String” [C:\Users\Alexey\Documents\RemObjects Software\Elements\Water\ConsoleApplication\Program.pas (9)]
E: Cannot cast from “String” to “Manual” [C:\Users\Alexey\Documents\RemObjects Software\Elements\Water\ConsoleApplication\Program.pas (10)]
E: Type “String” has no accessible constructors [C:\Users\Alexey\Documents\RemObjects Software\Elements\Water\ConsoleApplication\Program.pas (11)]
E: Type mismatch, cannot assign “String” to “Manual” [C:\Users\Alexey\Documents\RemObjects Software\Elements\Water\ConsoleApplication\Program.pas (13)]
E: Cannot cast from “String” to “Manual” [C:\Users\Alexey\Documents\RemObjects Software\Elements\Water\ConsoleApplication\Program.pas (14)]
E: Type “String” has no accessible constructors [C:\Users\Alexey\Documents\RemObjects Software\Elements\Water\ConsoleApplication\Program.pas (15)]

Unfortunately, String and array are the only types that don’t support lifetime management, because they are compiler generated. Is there any reason you want to use manual lifetime management on strings?

Just a test of new Oxygene feature :wink: And your docs uses the string type.

i’ll get the docs fixed, thanx!