Questions tagged [new-operator]
new is a language construct that dynamically allocates memory from free store and initialises the memory using the constructor.
new-operator
2,987
questions
0
votes
1
answer
19
views
I can't select a table from my databricks DBs in SQL - error AnalysisException: Delta table `default`.`incidents` doesn't exist
I am just starting out in databricks using SQL, and I just want to select a table and see the fields/columns , I know the table exists when you check the DB catalog but when I try to select it using * ...
0
votes
0
answers
30
views
Getting heap storage with proper alignment in C++ for overaligned type
In some use case, you'll need to allocate storage before creating objects inside this storage.
Then in order to create these objects, you may need to use placement new:
T *pobj = new(pstorage);
yet ...
-1
votes
1
answer
61
views
Getting heap storage with proper alignment in C++ for non-overaligned type
In some use case, you'll need to allocate storage before creating objects inside this storage.
Then in order to create these objects, you may need to use placement new:
T *pobj = new(pstorage);
yet ...
0
votes
1
answer
62
views
Can you create new objects with jdb print?
jdb's print allows evaluation of expression, but I'm not sure if it's possible to create new objects that way. Any new seems to return just null, e.g.:
Thread-0[1] print new java.lang.String("12&...
2
votes
1
answer
80
views
Correctly deleting a dynamically allocated plain array, allocated with `std::align_val_t` alignment parameter
As an answer to Idiom for initializing an std::array using a generator function taking the index?, I proposed a way to obtain a properly aligned storage.
Yet I think that my solution can be simplified,...
0
votes
1
answer
66
views
What is the meaning of the new operator when creating a modern tuple? Or is it a rudiment?
Let's say the new operator is left for the modern tuple as a rudiment. That is, it can be ignored.I can write it when returning a value from a method or property. But I can't write it when declaring a ...
0
votes
1
answer
114
views
Can std::make_shared cowork with operator new?
It is said that
std::make_shared uses ::new, so if any special behavior has been set up using a class-specific operator new, it will differ from std::shared_ptr<T>(new T(args...)).
So, given ...
3
votes
1
answer
110
views
How to get total allocated size in custom operator delete[]?
I understand we can use Class-specific overloads of operator new[]/delete[] to specify our own memory allocation strategy.
So I write the following code. I barely want to use the held field to record ...
0
votes
0
answers
20
views
cursor.execute problem , is giving error when i try to insert data
i have 3 pages , and i have a page where calls the info of the first page and makes calculation and give me error with placeholders (i asked chatgpt)
when i try to insert a producy gives me this error
...
0
votes
0
answers
28
views
I can not install a new custom indicator to Tradingview because the paste function does not appearin the drop down menu fix this problem?
How do I fix the following problem? I am adding a new custom indicator to Tradingview by going to Pine editor, add new indicator, open but there is no paste option in the drop down menu to paste the ...
0
votes
0
answers
54
views
Error when calling new operator - malloc.c:2379
I am trying to create a dbus proxy using a MyDBUS library I have been assigned
The problem is, when I try to do new MyDBUS() the program stops and a malloc error comes out on the screen output, before ...
0
votes
0
answers
22
views
replace new in std::__cxx11::basic_string
In my app., most 'new' operator including 'delete' is replaced with ones of my own. but it shows some 'new' operator in "std::__cxx11::basic_string" is yet not replaced and it is still using ...
0
votes
0
answers
18
views
How to get Freeradius to trust certs created else ware
I run a lab for testing for customers. I am trying to load the certs my customer has made into my freeradius so I can test TTLS and TLS wifi connections in real time without my customers help. I ...
-1
votes
1
answer
48
views
Inheritance in Java and its confusing things [closed]
class A {
public void m() {
System.out.println("A.m");
}
public void n() {
System.out.println("A.n");
}
}
class B extends A {
@Override
...
0
votes
0
answers
9
views
Buildfire - User Import via CSV file fails with encrypted base64 password?
BuildFire doesn't have seem to have any explicit documentation on bulk-import of users via a CSV file, except to "use the import template"
We are attempting to bulk-upload users from another ...