free Questions
4
I tried to install tinyMCE with angular 6. I am following the docs on https://www.tiny.cloud/docs/integrations/angular2/.
Everything OK but I must to have an apiKey to use the tinyMCE cloud.
I ...
3
Solved
I created some utilities which
help me to handle the management of a DinamicList. In the section that I
use to handle the removing of a element in a list, if there is
a element added that is stor...
Americanism asked 28/11, 2018 at 0:38
10
When I run my (C++) program it crashes with this error.
* glibc detected * ./load: double free or corruption (!prev):
0x0000000000c6ed50 ***
How can I track down the error?
I tried using pri...
5
Solved
I'm working on a school project and the teacher asked us to free all resources at program's termination.
I'm struggling to find a way to write more readable and/or less code to manage that, specifi...
Greatest asked 12/7, 2023 at 18:3
11
Solved
Theoretically I can say that
free(ptr);
free(ptr);
is a memory corruption since we are freeing the memory which has already been freed.
But what if
free(ptr);
ptr=NULL;
free(ptr);
As the...
Subtle asked 21/12, 2009 at 7:43
9
Solved
I would like to check if a pointer is freed already or not. How do I do this using gnu compiler set?
1
Solved
I am developing a program that is supposed to take a string as a parameter and display the number of occurrences of each word in their order of appearance.
I have a problem when the string contains...
4
Solved
Or rather, how does strtok produce the string to which it's return value points? Does it allocate memory dynamically? I am asking because I am not sure if I need to free the token in the following ...
4
Solved
Pointers are a really tricky thing in C. For a lot of people is hard to understand it, so for a good understanding I wrote following code:
#include <stdlib.h>
#include <stdio.h>
int m...
20
Solved
We are all taught that you MUST free every pointer that is allocated. I'm a bit curious, though, about the real cost of not freeing memory. In some obvious cases, like when malloc() is called insid...
8
Solved
I would like to free memory from my allocated binary tree what traversal is the best for doing so?
typedef struct Node{
struct Node * right;
struct Node * left;
void * data;
}Node;
typedef int (...
Aleda asked 7/2, 2012 at 17:46
3
Solved
I have a map filled with and now I want to delete the memory completely. How do I do this right? couldn't find anything specific for this topic, sorry if it is already answered...
my code is somet...
Arlynearlynne asked 10/4, 2013 at 11:24
1
Solved
My fuctions for insert and display look like below:
int push_front( Node **head, int rollnumber, int src, int dst, double gentime )
{
Node *new_node = malloc( sizeof( Node ) );
int success = new_...
Desai asked 13/1, 2022 at 18:41
2
This Question statement is came in picture due to statement made by user (Georg Schölly 116K Reputation) in his Question Should one really set pointers to `NULL` after freeing them?
if this Questi...
8
Solved
I came across an issue which I could not resolve.
My question is, if I used malloc to allocate memory and then memory block is delete using delete?
The general thumb rule is
If we allocate memory ...
Roseanneroseate asked 10/12, 2013 at 7:12
2
Solved
#include <stdlib.h>
#include <stdio.h>
struct node {
int value;
struct node* next;
};
typedef struct node node_t;
void print_list(node_t *head) {
node_t *temp = head;
while(tem...
Gravitative asked 2/5, 2021 at 17:24
5
Solved
Relating to a previous question of mine
I've successfully interposed malloc, but calloc seems to be more problematic.
That is with certain hosts, calloc gets stuck in an infinite loop with a pos...
Sachikosachs asked 27/10, 2011 at 1:2
6
I would like my class to have a static pointer to a dynamically allocated region of memory. I understand how to initialize it - in my case I will initialize it when the first object needs it. Howev...
Pickings asked 11/3, 2010 at 23:26
1
I'm looking to map the C# classes of my Visual Studio 2019 project on a dependency graph.
I've seen some tools available but they require you to pay for a full version (ReSharper, NDepend).
I...
Kinross asked 27/5, 2020 at 20:47
3
Solved
If you will look at the code of FreeAndNil procedure you will see:
procedure FreeAndNil(var Obj);
var
Temp: TObject;
begin
Temp := TObject(Obj);
Pointer(Obj) := nil;
Temp.Free;
end;
What is ...
11
Solved
In C programming, you can pass any kind of pointer you like as an argument to free, how does it know the size of the allocated memory to free? Whenever I pass a pointer to some function, I have to ...
3
Solved
I am reading a book (Programming with POSIX Threads by Butenhof, 1997) that uses C, and I came across the following line:
(void)free(data);
Here, data is just a pointer to an allocated struct,
...
Lavoisier asked 10/3, 2020 at 21:4
2
Solved
I'm pretty new to C (it's actually my first assignment with pointers), and I cant figure out this bug...
here is my code:
void str_rv(char c[]) {
int i, len = str_ln(c);
char *rev = (char*)call...
8
Is there a way to hook the malloc/free function call from a C application it self?
1
Solved
In Cython code, I can allocate some memory and wrap it in a memory view, e.g. like this:
cdef double* ptr
cdef double[::1] view
ptr = <double*> PyMem_Malloc(N*sizeof('double'))
view = <do...
Laudianism asked 28/3, 2016 at 15:5
1 Next >
© 2022 - 2025 — McMap. All rights reserved.