Is there a way to see if a pointer has been free'd?
Also, I changed my FreeQueue loop to only go between the head and tail, and it has helped. About 50% of the ram is freed. So success, but maybe not all the way.
Search found 8 matches
- Fri Sep 21, 2018 6:28 pm
- Forum: Coding Questions
- Topic: Pointers, functions, arrays and such?
- Replies: 8
- Views: 1671
- Fri Sep 21, 2018 3:47 pm
- Forum: Coding Questions
- Topic: Pointers, functions, arrays and such?
- Replies: 8
- Views: 1671
Re: Pointers, functions, arrays and such?
The arrayField is a char array that I use to represent the data I'm working on, there are also a couple of integers and a string field as well.
The queue is probably not empty, to clear it I've added a loop that goes through it and does a FreeStructure on each element. Before calling the function ...
The queue is probably not empty, to clear it I've added a loop that goes through it and does a FreeStructure on each element. Before calling the function ...
- Thu Sep 20, 2018 5:27 pm
- Forum: Coding Questions
- Topic: Pointers, functions, arrays and such?
- Replies: 8
- Views: 1671
Re: Pointers, functions, arrays and such?
About Queue, I would probably use a structured linkedlist for this purpose.
Irregardless of making an queue out of an array or linked list, the problem still persists when freeing the memory. Also I am exploring the pros and cons of both methods, but I want to solve this issue first.
I'm also ...
Irregardless of making an queue out of an array or linked list, the problem still persists when freeing the memory. Also I am exploring the pros and cons of both methods, but I want to solve this issue first.
I'm also ...
- Thu Sep 20, 2018 3:23 pm
- Forum: Coding Questions
- Topic: Pointers, functions, arrays and such?
- Replies: 8
- Views: 1671
Pointers, functions, arrays and such?
I'm working on a simple Queue, using an array and a couple of functions. It seems to work, I've set the type of the array to integer and the Enqueue functions signature is Enqueue(*state) and what I think I'm storing is the pointer to a structure with a couple of fields.
Is this actually a good ...
Is this actually a good ...
- Wed Sep 19, 2018 6:50 pm
- Forum: Coding Questions
- Topic: FreeStructure and arrays?
- Replies: 1
- Views: 750
FreeStructure and arrays?
I have a structure that has a field that is an array. When I call FreeStructure to remove it from memory, does the array get freed and deleted nicely or do I have to call FreeArray first?
- Fri Jul 21, 2017 2:37 pm
- Forum: Coding Questions
- Topic: Return array from procedure?
- Replies: 1
- Views: 1144
Return array from procedure?
How can I get array-data back from a procedure? I've read somewhere that I should give it back through input/output arguments or something like that?
Would anybody like to share an example?
Would anybody like to share an example?
- Wed Jul 19, 2017 1:31 pm
- Forum: Coding Questions
- Topic: Preventing RunProgram() Authorisation Screen
- Replies: 3
- Views: 1888
Re: Preventing RunProgram() Authorisation Screen
What you are seeing is probably the UAC-prompt in Windows. And to disable it requires changes to registry and a reboot according to an answer on stack overflow .
There are other suggestions in that stack overflow thread, such as making sure the first exe runs with elevated privileges, that way only ...
There are other suggestions in that stack overflow thread, such as making sure the first exe runs with elevated privileges, that way only ...
- Wed Jul 19, 2017 5:56 am
- Forum: Coding Questions
- Topic: Assign to array in structure?
- Replies: 1
- Views: 1100
Assign to array in structure?
I'm want to create a structure where one of the fields is an array so I did this
Structure MyState
Array statedata.l()
EndStructure
Then I want to assign an array to that field, and everything fell down. I can't figure out how to do that. It appears that I can create a loop to assign individual ...
Structure MyState
Array statedata.l()
EndStructure
Then I want to assign an array to that field, and everything fell down. I can't figure out how to do that. It appears that I can create a loop to assign individual ...