View Single Post
nosoop
Veteran Member
Join Date: Aug 2014
Old 10-12-2020 , 02:58   Re: Return arrays in ArrayLists by reference
Reply With Quote #3

You can't - the contents of an ArrayList are outside of a plugin's memory space; the only way a plugin is allowed to access it is through the provided natives, and none of them give you that kind of memory access.

ArrayList.Set lets you update specific entries in an array stored in an ArrayList; otherwise you will need to copy data to / from your plugin (as you've already discovered).

What's your particular use case? Without further context this sounds like a preemptive attempt at optimization.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 10-12-2020 at 03:03.
nosoop is offline