python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
What happens to malloced data in a struct in C when it is assigned to another variable?
Let's say I have a structure named "example" which has a member named data which stores data allocated on the heap:
typedef struct _EXAMPLE
{
signed char *data;
size_t size;
} exampl...
William Ryman
Votes: 0
Answers: 3
Setting a Pointer to `NULL` Inside a Function and Having it Stay `NULL` in C
I'm fairly new to the C programming language, and I am trying to make an idiomatic pattern for creating structures (i.e. a series of standard constructors, destructors, etc.) like so:
typedef struct _...
William Ryman
Votes: 0
Answers: 3
Which objects are available for GC?
I am writing the program, which should be optimized for usage of heap and GC. Based on this I need to create as less objects as possible. So I am wondering if it is a matter for GC if I write the comm...
Balconsky
Votes: 0
Answers: 1
How are an object's instance methods used and stored?
Let’s say in my main method I have the line of code LinkedList<E> myLinkedList = new LinkedList<>(), so now I have a reference/pointer variable named myLinkedList1 to an object (and the co...
ZenPyro
Votes: 0
Answers: 2