![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Wed, Jun 29 2016 11:38 AM | Permanent Link |
Matthew Jones | Could you clarify the lifetime and ownership of
TServerRequestQueue.GetNewRequest returns please? If I call it, who owns the allocated request? When does it get freed? Is that something that happens automatically after the callback, or some other time? -- Matthew Jones |
Wed, Jun 29 2016 12:25 PM | Permanent Link |
Raul Globestar Systems ![]() | On 6/29/2016 11:38 AM, Matthew Jones wrote:
> Could you clarify the lifetime and ownership of > TServerRequestQueue.GetNewRequest returns please? If I call it, who > owns the allocated request? When does it get freed? Is that something > that happens automatically after the callback, or some other time? > We have the framework source and my interpretation after looking at it is as follows: - the main benefit of using GetNewRequest (over just doing TServerRequest.Create in your code) is that TServerRequestQueue maintains a pool of requests and can return one of those - at that point you own it - however if you add the request back to the TServerRequestQueue then it will own it for you (and once complete or cancelled will add it to the available request queue again) Raul |
Wed, Jun 29 2016 12:44 PM | Permanent Link |
Matthew Jones | Raul wrote:
> We have the framework source and my interpretation after looking at > it is as follows: > > - the main benefit of using GetNewRequest (over just doing > TServerRequest.Create in your code) is that TServerRequestQueue > maintains a pool of requests and can return one of those > > - at that point you own it > > - however if you add the request back to the TServerRequestQueue > then it will own it for you (and once complete or cancelled will add > it to the available request queue again) Okay, that's handy to know. Would be good to have that documented in the help so one can know to "not care" too much. -- Matthew Jones |
This web page was last updated on Wednesday, March 29, 2023 at 10:59 PM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |