Jump to content

elGringo

uniGUI Subscriber
  • Posts

    434
  • Joined

  • Last visited

  • Days Won

    13

elGringo last won the day on January 6 2020

elGringo had the most liked content!

Recent Profile Visitors

2363 profile views

elGringo's Achievements

Advanced Member

Advanced Member (4/4)

52

Reputation

  1. Hi, if i use ServiceLocator from spring4d and need singleton per thread, then where shoud i put my container better - in serverModule or mainModule? I do smth. like this var container: TContainer; begin container := GlobalContainer; container.RegisterInstance<TContainer>(container); container.RegisterType<TServiceLocatorAdapter>.AsSingletonPerThread; container.RegisterType<TTestService>.AsSingletonPerThread; container.Build; end;
  2. Hi, on build having hints. Is it my glitch or common? Delphi Sydney UniGUi 1.90.0.1539 All of them from uIndyFolder, so it could be fixed, but anyway it is interesting to me is that trash that should be removed in future? [dcc32 Hint] uIdStackWindows.pas(1428): H2077 Value assigned to 'LAddress' never used [dcc32 Hint] uIdStackWindows.pas(1794): H2077 Value assigned to 'TIdSocketListWindows.GetItem' never used [dcc32 Hint] uIdIOHandler.pas(2590): H2077 Value assigned to 'TIdIOHandler.WriteFile' never used [dcc32 Hint] uIdThread.pas(670): H2443 Inline function 'TList.Remove' has not been expanded because unit 'System.Types' is not specified in USES list [dcc32 Hint] uIdCustomHTTPServer.pas(1279): H2077 Value assigned to 'LCloseConnection' never used [dcc32 Hint] uIdSSLOpenSSL.pas(1268): H2077 Value assigned to 'Lin' never used [dcc32 Hint] uIdSSLOpenSSL.pas(1355): H2077 Value assigned to 'Lin' never used [dcc32 Hint] uIdSSLOpenSSL.pas(2580): H2077 Value assigned to 'TIdServerIOHandlerSSLOpenSSL.Accept' never used Regards, Stan
  3. Forever Young !) I'm coding on Delphi and enjoy it )))
  4. Hi, yes, Desktop Applications directly connected to a DB server. DB used local as usually.
  5. Delphi forever young! UniGUI is the best!
  6. Hi, everyone. On my work, we have a lot of programs on Delphi. But ! Our government told that we have to move to national software to that is in registry of government to 2021 year. And in this registry only one operational system - Linux. So, we have 2 years to do smth. Could anyone give an advice what variants possible to not to change stack ? We have variant to move everything to .net core and react. So, is any way to solve this in Delphi way ? I found fmx linux framework, so could it be a decision ? Or maybe some server side on Delphi for Linux ? Is smth. interesting in UniGUI roadmap ?
  7. No! I use UniGUI in my projects. It looks like this is the best Web framework for Delphi. Hope Mr. Farshad will develop it to next years! Regards...
  8. Thnks! Just thought there is the way that shows "SomeUnit, string 157, memoryLeak 120 Kb, TStringList" ))
  9. And what about this example? Wrapper for classes, based on ARC ? Looks smart ))) So, you may avoid try... finally... and just Create Use Forget ))) unit uSmartPointer; interface type ISmartPointer<T> = reference to function: T; TSmartPointer<T: class, constructor> = class(TInterfacedObject, ISmartPointer<T>) private FValue: T; function Invoke: T; procedure SetValue(const Value: T); public constructor Create; overload; constructor Create(AValue: T); overload; destructor Destroy; override; function Extract: T; property Value: T read FValue write SetValue; end; implementation constructor TSmartPointer<T>.Create; begin inherited Create; FValue := T.Create; end; constructor TSmartPointer<T>.Create(AValue: T); begin inherited Create; FValue := AValue; end; destructor TSmartPointer<T>.Destroy; begin FValue.Free; inherited; end; function TSmartPointer<T>.Invoke: T; begin Result := FValue; end; procedure TSmartPointer<T>.SetValue(const Value: T); begin FValue := Value; end; function TSmartPointer<T>.Extract: T; begin Result := FValue; FValue := nil; end; end. Example of use procedure Smart; var sl: ISmartPointer<TStringList>; begin sl := TSmartPointer<TStringList>.Create(); sl.Add('I am inside automanaged StringList'); end;
  10. and besides, my topic start code here gives 2 possibilities -manage code manually as usual, by grouping instances by tag -100 % clear on App Close if you have forgotten to clear smth inside the scope (protection from human factor...) Regards...
  11. Another alternative to the class i showed is ARC, but here we should know about weak, unsafe links and raw pointers I'm reading now book Delphi Memory Management for Classic and ARC Compilers...
  12. hm... agree with you, just it was start for discussion about the memory management in Delphi. So, could you say how do you look for memory leaks with fastMM - i don't know that for the moment. I use only ReportMemoryLeaksOnShutdown := true; But this approach only says me that there is a memory leak and what is leaking TStringList or etc... But how, for example you find memory leak in special exact place of code? Regards, Stan
×
×
  • Create New...