I am really confused now on how and which method to use to return object from a function. I want some feedback on the solutions for the given requirements.
Scenario A:
The returned object is to be stored in a variable which need not be modified during its lifetime. Thus,
const Foo SomeClass::GetFoo() {
return Foo();
}
invoked as:
...
Is there any really low level programming language that can get access the memory variable directly? For example, if I have a program have a variable i. Can anyone access the memory to change my program variable i to another value?
...
Is there a way to access (read or free) memory chunks that are outside the memory that is allocated for the program without getting access violation exceptions.
Well what I actually would like to understand apart from this, is how a memory cleaner (system garbage collector) works. I've always wanted to write such a program. (The languag...
I am somewhat new to PHP and I am wondering: How important is it to unset variables in PHP? I know in languages like C we free the allocated memory to prevent leaks, etc. By using unset on variables when I am done with them, will this significantly increase performance of my applications?
Also is there a benchmark anywhere that compares...
Hello,
I have a method that needs to parse through a bunch of large PNG images pixel by pixel (the PNGs are 600x600 pixels each). It seems to work great on the Simulator, but on the device (iPad), i get an EXC_BAD_ACCESS in some internal memory copying function. It seems the size is the culprit because if I try it on smaller images, eve...
I have a DLL which provided a decoding function, as follows:
function MyDecode (Source: PChar; SourceLen: Integer; var Dest: PChar; DestLen: Integer): Boolean; stdcall;
The HostApp call "MyDecode", and transfer into the Source, SourceLen and Dest parameters, the DLL returns decoded Dest and DestLen.
The problem is: The HostApp impo...
I am using an LPC2132 ARM chip to develop a program. However, my program has grown larger than the space on the chip.
How can I connect my chip to some sort of external memory chip to hold additional executable code? Is this possible? If not, what do people normally do when they run out of chip space?
...
Hi, i don't understand how this happen. This is portion of my code..
int isGoal(Node *node, int startNode){
int i;
.
.
}
When i debug this using gdb i found out that 'i' was allocated at the memory address that have been previously allocated.
(gdb)print &node->path->next
$26 = (struct intNode **) 0xffbff2f0
(gdb)...
With PROCESS_MEMORY_COUNTERS_EX, I can find the peak pagefile (VM) size since the beginning of a process. Can I somehow get the peak pagefile size starting from some other point in time?
...
I'm using a std::map, and I can't seem to free the memory back to the OS. It looks like,
int main(){
aMap m;
while(keepGoing){
while(fillUpMap){
//populate m
}
doWhatIwantWithMap(m);
m.clear();//doesnt free memory back to OS
//flush some buffered values into map for next iteration
flushIntoMap(m);
...
hello
how can i read image from clipboard ?
i was only able to raed text using wx.clipboard. but not images
is it possible to read images with wx.clipboard?
or there is another way?
i use python2.5 and windows vita 64 bit
thanks in advance
...
Hi there!
I'm having the following problem. I need to store huge amounts of information (~32 GB) and be able to manipulate it as fast as possible. I'm wondering what's the best way to do it (combinations of programming language + OS + whatever you think its important).
The structure of the information I'm using is a 4D array (NxNxNxN) ...
How do you programmatically detect the application heap size available to an Android app?
I heard there's a function that does this in later versions of the SDK. In any case, I'm looking for solution that works for 1.5 and upwards.
...
The problem
My concern is the following: I am storing a relativity large dataset in a classical python list and in order to process the data I must iterate over the list several times, perform some operations on the elements, and often pop an item out of the list.
It seems that deleting one item out of a Python list costs O(N) since Py...
I have a certain web application that makes upwards of ~100 updates to an Oracle database in succession. This can take anywhere from 3-5 minutes, which sometimes causes the webpage to time out. A re-design of the application is scheduled soon but someone told me that there is a way to configure a "loader file" which loads the schema into...
How do I display an image of arbitrary size without OOMing or downscaling the image.
I dont want to downscale due to zooming and dragging of the picture?
If it isnt possible to display an image of arbitrary size, how do I determine the maximum possible size of the image to display, without causing a OOM?
...
Hi!
I'm making an application which uses MANY images. The application gets the images from a server, and downloads them one at a time.
After many images the creation of a bitmap returns an exception, but i don't know how to solve this. Here is my function for downloading the images:
public static Bitmap getImageFromWholeURL(String sURL...
In java ,where in memory are class functions put?
...
I'm building a Qt application that have about 30 different views (QWidgets). My idea is to use a QStackedWidget to make it easy to switch between the different views in the application. I have two different solutions of how to implement this and use as little memory as possible when the user navigates through the application.
Solution ...
Hi.In my Iphone app I am getting:
objc[597]: FREED(id): message release sent to freed object=0x3b81780
error.What should cause this error?IS it about memory allocation? I have UITable and model view that include some text field.It takes username from model view and search this in internet and gets some images from internet.It takes ...