Jump to content

Ruslan

Members
  • Content Count

    43
  • Joined

  • Last visited

Posts posted by Ruslan


  1. On 2/10/2020 at 7:22 AM, Larry Hengen said:

    Well I have been using FlameRobin which is cross platform, but has some issues and is apparently no longer under active development.  I thought I would try out this utility, but I downloaded the Win64 Zip package, expanded it into a folder and launched it.....BOOM...AV before the main GUI appeared. 

    Same thing for me, AV on start


  2. If the question is about of language choice, than I would recommend (as I do for my projects):

    • first of all I would prefer python for scientific calculations and operations, but I don't like it because of its script language and I couldn't compile it in a lib/dll/exe, even if I do use it in some projects
    • than, if the choice for scientific calculations and operations was not in favor of python, I would chose C++, it could be used to build DLLs for later use
    • and last but not least, I prefer Delphi for visual/database/networking applications programming, here I can use my DLLs created in C++

    What I wanted to say is that you should not stop looking in one direction, there is no just one solution for developing a project, its up to you what to chose, but need to think before and model your project before all.

    • Like 1

  3. 19 hours ago, David Heffernan said:

    You said that the objects were instantiated by calling the constructor. You later say that they are loop variables used when iterating over a collection.

    These are just 2 ways of usage (in a constructor "OR" as iterator) as was written

    22 hours ago, Ruslan said:

    (e.g. aItem := TItem.Create;  or as iterations in Dictionary or ObjectLists)

    that is the answer I was expected for iterators

    19 hours ago, David Heffernan said:

    you never need to set the loop variable to nil

    so I guess if a pointer is declared in a method that is used to fill a Dictionary, List or ObjectList than it is not needed to set it to nil at the end


  4. 2 hours ago, ByteJuggler said:

    This means if you merely assign "nil" to an object reference, the memory pointed to originally by that reference is still allocated in the heap somewhere, but now "lost" -- you've caused a memory leak(!).  

    I do not need to free the object, I use the variable as a iterator in a Dictionary or ObjectList, so the items in them do not need to be freed.

    I don't have problems o memory leaks, all the objects a freed where should be, I have just some messages in building the project.

     

    Please read again my question.


  5. I use a lot of class/pointer variables (e.g. aItem := TItem.Create;  or as iterations in Dictionary or ObjectLists) inside methods as local and temporary variables, at the end of each method I used to write "aItem := nil;" if no longer need that.

    In building the application I see a lot of "H2077 Value assigned to 'aItem' never used".

    Also in some functions I used to write the default Boolean Result value at the beginning as "False", and the builder show in messages "H2077 Value assigned to <function> never used".

     

    What is the right way of freeing the local class variables (without loosing the data) and default function result values?

     


  6. 3 minutes ago, Ruslan said:

    I use TFrameStand, on a frame there are buttons with actions, on destroying the frame a AV error shows up from FMX.Controls TControl.CLick (line 4314)

    
    if LAction <> nil then
      LAction.Target := nil;

    LAction is not nil but all its members are.

    Is it a bug or am I doing something wrong?

    Solved that by adding folowing code into buttons' actions

    TDelayedAction.Execute(50
    , procedure
    	begin
    		// action code
    	end
    );

     


  7. I use TFrameStand (using Wizard demo), on a frame there are buttons with actions, on destroying the frame a AV error shows up from FMX.Controls TControl.CLick (line 4314)

    if LAction <> nil then
      LAction.Target := nil;

    LAction is not nil but all its members are.

    Is it a bug or am I doing something wrong?

×