Jump to content

Memnarch

Members
  • Content Count

    34
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Memnarch

  1. Memnarch

    Directions for ARC Memory Management

    Here is an example on SO What i was referring to is std::shared_ptr. A SmartPointer is nothing more than a struct(record) which wraps some kind of pointer and does the lifetimehandling for you by doing actions when scopes are left or smartpointers are reassigned. The std::shared_ptr implements the same behavior we know from strings and interfaces in Delphi. Keeping a referencecounter on top of the allocated memory and freeing it, once the counter reaches zero. In C++ you wrap Interfaces into those, too, because the compiler does not call AddRef/Release automatically (the smartpointer does that for you). SO whenever an object is wrapped by a std::shared_ptr, you know you can safely keep the SharedPointer. Previously, Delphi had no initialize/finalize and Assign operators on records(which are present in C++). Therefore it was impossible to write one(if you didn't want to wrap something in a wrapper TInterfacedObject, being much larger than a SmartPointer)
  2. Yep looks like the principle i wanted to investigate in^^(the combination of webview and native)
  3. Gues what i want to Experiment with XD
  4. Mh yes. But from what i understood, regarding the Pushapi in chrome, it can work in the background. However atm on my chrome(android 7), it doesn't seem like it actually creates push notifications but only blends in a custom overlay while i browse the site.
  5. Just signed in in Chrome on my Android. Asked me if i want to recieve Notifications. So if you quote me here that should push something 😉
  6. Memnarch

    Directions for ARC Memory Management

    Would love to see that. While I'm not an expert to C++, working with it in the UnrealEngine makes it so much simpler to identify ownership just by looking at the declaration of a parameter for example. Which means: If an argument is not a Shared-Pointer, you can't store the value anywhere and only use it during runtime of the method. If it is a Shared-Pointer, you can keep that if needed. The Story of "Who owns it?" suddenly becomes very short 🙂 An exception here are UnrealProperties but that is blackmagic beyond the scope of what i wanted to say here 😉
  7. Memnarch

    Directions for ARC Memory Management

    Not to mention: If ManagedRecords work as good as what you can do in C++, you can write SmartPointers that enable reference counting when needed. Not just for objects but any memory blop you desire.
×